A minimalistic CLI tool for running commands with AWS SSM parameter substitution.
Heavily inspired by 1Password CLI's op run command.
go install github.com/maxcleme/ssm@latestSet environment variables with ssm:// prefixes:
export API_KEY="ssm:///myapp/api/key"Run commands with SSM parameter substitution:
ssm run -- printenv API_KEY
ssm run -- docker run -e API_KEY myappLoad environment variables from a file using --env-file:
ssm run --env-file .env.prod -- node server.jsThe file format supports:
KEY=valuepairs (one per line)- SSM references (
KEY=ssm:///path/to/secret) - Comments (lines starting with
#)
Variables from the file are merged with your current environment, with file values taking precedence.