dotenv-ssm

Simple utility to fetch env vars from the AWS SSM Parameter Store and create a .env file from them.

Usage no npm install needed!

<script type="module">
  import dotenvSsm from 'https://cdn.skypack.dev/dotenv-ssm';
</script>

README

DOTENV SSM npm

Simple utility to fetch env vars from the AWS SSM Parameter Store and create a .env file from them.

Note: this script will auto-decrypt the vars.

Usage

Intended to be run as a script, with the following env vars:

AWS_ACCESS_KEY_ID=accessKey
AWS_SECRET_ACCESS_KEY=secretKey
AWS_REGION=us-east-1
SSM_PREFIX=/myapp/production/

You can execute it with npx:

npx dotenv-ssm

Or, if you have it installed as a binary:

dotenv-ssm

Or as part of an npm script:

{
  "name": "example",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "ssm-secrets": "dotenv-ssm"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "dotenv-ssm": "^1.0.0"
  }
}

Installation

# npm
npm i dotenv-ssm

# yarn
yarn add dotenv-ssm

Licence

MIT