@fanmiles/nodejs-aws-secret-retriever

Used for retrieving a secret from AWS Secrets Manager.

Stats

StarsIssuesVersionUpdatedCreatedSize
@fanmiles/nodejs-aws-secret-retriever
301.0.23 years ago3 years agoMinified + gzip package size for @fanmiles/nodejs-aws-secret-retriever in KB

Readme

@fanmiles/nodejs-aws-secret-retriever

Used for retrieving a secret from AWS Secrets Manager. After successful retrieve the manager caches the secret in memory for faster access.

Usage

const AWS = require('aws-sdk');
const SecretsRetriever = require('@fanmiles/nodejs-aws-secret-retriever');

const awsSecretsManager = new AWS.SecretsManager({
  apiVersion: '2017-10-17',
  region: 'eu-central-1',
});

const secretsRetriever = new SecretsRetriever({ awsSecretsManager });

secretsRetriever.retrieveSecret('your/secret/id')
  .then((secret) => {
    console.log(secret);
  })
  .catch((error) => {
    console.error(error);
  });

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.