typescript-aws-sts-helper
v2.0.48
Published
Typescript AWS STS Helper
Downloads
58
Maintainers
Readme
Typescript helper functions for AWS STS service
Install
npm install typescript-aws-sts-helper@latest
Usage
Default - running in Lambda in your own account
const logger = new Logger(LogLevel.Trace);
const helper = new STSHelper(logger);
const response = await helper.AssumeRoleAsync('roleArn');
Running in separate account or not in Lambda
import * as STS from '@aws-sdk/client-sts';
const logger = new Logger(LogLevel.Trace);
const options: STS.STSClientConfig = {
accessKeyId: '{access_key}',
secretAccessKey: '{secret_key}',
region: 'us-east-1',
};
const repository = new STS.STS(options);
const helper = new STSHelper(logger, repository);
const response = await helper.AssumeRoleAsync('roleArn');
Notes
If no options are supplied, will default to us-east-1
as the region
Development
Clone the latest and run
npm run prep
to install packages and prep the git hooks