typescript-aws-kms-helper
TypeScript icon, indicating that this package has built-in type declarations

2.0.49 • Public • Published

typescript-aws-kms-helper

Typescript helper functions for AWS KMS service

CI/CD codecov NPM Version Downloads

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

Dependencies (4)

Dev Dependencies (18)

Package Sidebar

Install

npm i typescript-aws-kms-helper

Weekly Downloads

0

Version

2.0.49

License

MIT

Unpacked Size

20.7 kB

Total Files

21

Last publish

Collaborators

  • kbrashears5