Skip to content
This repository has been archived by the owner on Jul 16, 2022. It is now read-only.
/ aws-ssm-env Public archive

Load your secret configuration values from AWS using environment variables

License

Notifications You must be signed in to change notification settings

MarioCarrion/aws-ssm-env

Repository files navigation

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published