Socket
Book a DemoInstallSign in
Socket

ac-awssecrets

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ac-awssecrets

Reads secrets from AWS secrets manager and adds them to the configuration of the embedding app.

Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
73
-22.34%
Maintainers
1
Weekly downloads
 
Created
Source

AC AWS Secrets

Reads secrets from AWS secrets manager and adds them to the configuration of the embedding app.

Usage

const secretParams = {
  aws: {
    accessKeyId: 'accessKeyId',
    secretAccessKey: 'secretAccessKey',
    region: 'eu-central-1'
  },
  secrets: [
    { key: 'redis', name: 'redis.cacheServer', servers: true, serverName: 'cacheServer', ignoreInTestMode: true }
  ],
  config: existingConfig,
  environment: 'development'
}

awsSecrets.loadSecrets(secretParams, (err, result) => {
  if (err) return cb(err)
  _.forEach(result, (item) => {
    console.log('Setting secret for', _.padEnd(_.get(item, 'key'), 25), '->', _.get(item, 'name'))
  })
  return cb()
})

Parameters

  • aws - object with accessKeyId, secretAccessKey and region (IAM user must have permission to read the secrets)
  • secrets - array of secrets to fetch
  • config - the current config (secrets will be merged into it)
  • environment - the current node environment (e.g. test, production, ... defaults to development)

License

MIT

FAQs

Package last updated on 08 Jun 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts