Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nem035/dotenv-ssm
Build .env from AWS SSM
https://github.com/nem035/dotenv-ssm
12factor aws dotenv ssm
Last synced: 7 days ago
JSON representation
Build .env from AWS SSM
- Host: GitHub
- URL: https://github.com/nem035/dotenv-ssm
- Owner: nem035
- License: mit
- Created: 2020-11-22T10:47:11.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2023-10-12T09:55:02.000Z (about 1 year ago)
- Last Synced: 2024-10-28T20:30:02.548Z (about 2 months ago)
- Topics: 12factor, aws, dotenv, ssm
- Language: JavaScript
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DOTENV SSM [![npm](https://img.shields.io/npm/v/dotenv-ssm.svg?style=flat-square)](https://www.npmjs.com/package/dotenv-ssm)
Simple utility to fetch env vars from the [AWS SSM Parameter Store](https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-parameter-store.html) 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:
```ssh
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`:
```sh
npx dotenv-ssm
```Or, if you have it installed as a binary:
```sh
dotenv-ssm
```Or as part of an npm script:
```json
{
"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
```sh
# npm
npm i dotenv-ssm# yarn
yarn add dotenv-ssm
```## Licence
MIT