aws-secrets-dotenv
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

npm NPM

aws-secrets-dotenv

aws-secrets-dotenv is a tool that manages your envrionment variables for an application stored in the AWS 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

npm install aws-secrets-dotenv --save-dev
// .secretsrc
{
  "Name": "MyProject",
  "Description": "My super cool project!",
  "LIST_OF_SECRETS": [
    "DATABASE_URI"
  ]
}

Usage

The default stage is dev.

// 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.
  }

Package Sidebar

Install

npm i aws-secrets-dotenv

Weekly Downloads

66

Version

2.0.0

License

MIT

Unpacked Size

8.83 kB

Total Files

12

Last publish

Collaborators

  • niisama