MarioCarrion / aws-ssm-env

Load your secret configuration values from AWS using environment variables

Repository from Github https://github.comMarioCarrion/aws-ssm-envRepository from Github https://github.comMarioCarrion/aws-ssm-env

AWS Systems Manager (SSM) Environment Variables

Motivation

Storing configuration in the environment, as in a Twelve factor App, is a common use case. However there are cases where there's the need to properly secure the value of those variables, for example when exposing secrets (such as usernames and passwords) or defining API Tokens.

What is this?

aws-ssm-env is a Go package that allows you load configuration values from environment variables and in cases where explicitly stated it could load the values from AWS SSM.

How does it work?

  1. Define a new struct that will hold all your configuration values, decorate it using the ssm tag.
  2. Load your configuration file, if needed.
  3. Initialize AWS SSM
  4. Load the configuration values.

Please look at the example for a concrete full example.

Development

  • Install direnv
  • Install required tools using ./script/tools.sh
  • go generate ./... and go test ./... as usual

About

Load your secret configuration values from AWS using environment variables

License:MIT License


Languages

Language:Go 97.9%Language:Shell 2.1%