UNPKG

secrets2env

Version:

Retrieves secrets from AWS Secrets Manager and writes them as an env file.

25 lines (20 loc) 1.13 kB
# secrets2env Helpful little tool for retrieving secrets from AWS Secrets Manager and writing as json, or an .env type file. ## Installation ``` # Global $ npm install -g secrets2env # Local $ npm install secrets2env (run with npx) ``` ## Usage This utility will pull secrets stored in [AWS Secerets Manager](https://aws.amazon.com/secrets-manager/) and dump them to stdout where they can be redirected to a file. The default format will be for an .env file (VAR=val). Also supports --format=json for a json formatted doc. It can authenticate via IAM, or if running outside of AWS via authentication env vars, or it will use the ~/.aws/credentials file. If using the credentials file, the --profile argument can be used to select the correct profile. ``` Usage: secrets2env [OPTIONS] SecretId Options: -h, --help Display help screen -f, --format Currently only takes JSON (Default=.env file format) -p, --profile If using local ~/.aws credentials -r, --region Region to use for secrets lookup -v, --version Display version ```