Simple AWS Role Assumption
npm install aws-simple-assume
This file contains the code to assume a role in another account
Example
import { assumeRole } from 'aws-simple-assume'
const credentials = await assumeRole('arn:aws:iam::123456789012:role/role-name', 'role-session-name')
Assume a role in another account.
Kind: inner method of aws-simple-assume
Returns: Promise.<Credentials>
- credentials
Param | Type | Description |
---|---|---|
RoleArn | string |
The ARN of the role to assume |
RoleSessionName | string |
The name of the role session |
options | Options |
Options |
Kind: inner typedef of aws-simple-assume
Properties
Name | Type | Description |
---|---|---|
accessKeyId | string |
Access Key ID |
secretAccessKey | string |
Secret Access Key |
sessionToken | string |
Session Token |
[expiry] | Date |
Expiry Date |
Kind: inner typedef of aws-simple-assume
Properties
Name | Type | Description |
---|---|---|
[ExternalId] | string |
External ID |
[Credentials] | Credentials |
Credentials |
[Policy] | string |
Policy |