aws-simple-assume
v1.2.0
Published
Simple AWS Assume Role
Downloads
9
Maintainers
Readme
aws-simple-assume
Simple AWS Role Assumption
Install
npm install aws-simple-assume
API Reference
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')
aws-simple-assume~assumeRole(RoleArn, RoleSessionName, options) ⇒ Promise.<Credentials>
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 |
aws-simple-assume~Credentials : object
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 |
aws-simple-assume~Options : object
Kind: inner typedef of aws-simple-assume
Properties
| Name | Type | Description | | --- | --- | --- | | [ExternalId] | string | External ID | | [Credentials] | Credentials | Credentials | | [Policy] | string | Policy |