An executable dependency that would retrieve secrets from AWS and set them up as environment variables.
npm install --save @tconnect/secrets2env
./node_modules/.bin/secrets2env && node index.js
const secrets2env = require('@tourconnect/secrets2env');
// 2015 version
secrets2env.config.then(function() {
// all loaded
});
// 2019 version
const main = async () => {
await lib.config();
};
- secretName
and if you are not using a ~/.aws/credentials file:
- accessKeyId
- secretAccessKey
optionally:
- region