Provides a convenient way to launch a subprocess with environment variables populated from AWS Secrets Manager.
awssm2env <command> [<arg...>]
- Overwrites matching values for system ENV keys with values stores in AWS Secrets Manager.
- Launches desired final application acting as a wrapper/entrypoint for easy secrets injection to deployment flow.
export AWS_SECRET_ACCESS_KEY=anything
export AWS_ACCESS_KEY_ID=anything
export AWS_REGION=us-east-1
- Desired environment entry:
DATABASE_PASSWORD=prod_db_secret1
- AWS SM:
aws --endpoint-url=http://localhost:4584 secretsmanager create-secret --name "DATABASE_PASSWORD" --description "DB secret" --secret-string '{"password":"prod_db_creds"}' --region=us-east-1
AWS_ENDPOINT="http://localhost:4584"
AWS_DEBUG=true
- Integration tests
- Switch initial secrets retrieval from AWS SM API to ListSecrets action (currently not support in Localstack)
- Check signal handling in various use-cases