typescript-aws-kms-helper
v2.0.49
Published
Typescript AWS KMS Helper
Downloads
27
Maintainers
Readme
Typescript helper functions for AWS KMS service
Install
npm install typescript-aws-kms-helper@latest
Usage
Default - running in Lambda in your own account
const logger = new Logger(LogLevel.Trace);
const helper = new KMSHelper(logger);
const response = await helper.DecryptAsync('encryptedValue');
Running in separate account or not in Lambda
import * as KMS from '@aws-sdk/client-kms';
const logger = new Logger(LogLevel.Trace);
const options: KMS.KMSClientConfig = {
accessKeyId: '{access_key}',
secretAccessKey: '{secret_key}',
region: 'us-east-1',
};
const repository = new KMS.KMS(options);
const helper = new KMSHelper(logger, repository);
const response = await helper.DecryptAsync('encryptedValue');
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