Skip to main content
Version: 2.0

Basic AWS example

This example uses an AWS account, defines credentials for a database, and inject them in a context.

It requires the following environment values:

  • SECENV_aws_account_access_key_id
  • SECENV_aws_account_secret_access_key
  • SECENV_aws_account_region
.secenv.yaml
stores:
aws_account:
type: aws

secrets:
- secret: DATABASE_CREDENTIALS
store: aws_account
keys:
- host
- user
- password

contexts:
default:
vars:
DB_HOST:
store: aws_account
secret: DATABASE_CREDENTIALS
key: host
DB_USER:
store: aws_account
secret: DATABASE_CREDENTIALS
key: user
DB_PASSWORD:
store: aws_account
secret: DATABASE_CREDENTIALS
key: password

Now, it is possible to run the following commands:

# Fill the secrets
$ secenv secrets

# And generate the context
$ secenv contexts
default

$ secenv context default
export DB_HOST='...'
export DB_USER='...'
export DB_PASSWORD='...'