aws-secret-manager-fetcher
v1.0.3
Published
Get secrets from AWS secret manager
Downloads
155
Readme
AWS Secret Manager Fetcher
A dead simple module to fetch secrets from AWS secret manager.
Install
> npm install --save aws-secret-manager-fetcher
Usage
const { fetchSecrets } = require('aws-secret-manager-fetcher')
async function init () {
try {
let secrets = await fetchSecrets('my-secret-name')
} catch (e) {
console.log('Error getting secrets ', e)
}
}
API
fetchSecrets(secretName, [, awsParams])
secretName
(String) - name of your secret.awsParams
(Object) - AWS SecretManager constructor params. If empty or missing a region property, the default will be:{ region: 'us-east-1' }