Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/supersoniko/aws-secrets-dotenv
Easily manage your environment variables on AWS with .env
https://github.com/supersoniko/aws-secrets-dotenv
Last synced: about 4 hours ago
JSON representation
Easily manage your environment variables on AWS with .env
- Host: GitHub
- URL: https://github.com/supersoniko/aws-secrets-dotenv
- Owner: supersoniko
- License: mit
- Created: 2019-09-27T13:19:35.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-12-22T16:01:34.000Z (11 months ago)
- Last Synced: 2024-04-14T06:52:25.712Z (7 months ago)
- Language: TypeScript
- Homepage:
- Size: 126 KB
- Stars: 16
- Watchers: 3
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![npm](https://img.shields.io/npm/v/aws-secrets-dotenv)
![NPM](https://img.shields.io/npm/l/aws-secrets-dotenv)# aws-secrets-dotenv
aws-secrets-dotenv is a tool that manages your envrionment variables for an application stored in the [AWS Secrets Manager](https://aws.amazon.com/secrets-manager/).
The tool can store envrionment variables from the machine it's run on to the AWS Secrets Manager and retrieve secrets from AWS to a `.env` file which is a standard for a lot of technologies.
This tool is typically used in the build pipeline of an application.> **_NOTE:_** Always be careful not to leak the .env file. This is a common security concern.
## Installation
```sh
npm install aws-secrets-dotenv --save-dev
```
```js
// .secretsrc
{
"Name": "MyProject",
"Description": "My super cool project!",
"LIST_OF_SECRETS": [
"DATABASE_URI"
]
}
````## Usage
The default stage is `dev`.
```js
// package.json
"scripts": {
"upload-secrets": "aws-secrets-dotenv createOrUpdateSecret prod", // Store the environment variables of this machine to AWS Secrets Manager for prod environment.
"retrieve-secrets": "aws-secrets-dotenv createLocalEnvironment prod" // Retrieve the environment variables from AWS Secrets Manager prod envrionment to a .env file in the root folder.
}
````