Skip to content

A simple Go binary to get an AWS SSM secret or plain string

License

Notifications You must be signed in to change notification settings

ktruckenmiller/go-aws-get-parameter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AWS Get Parameter

Tl;DR;

Download the executable here.

Get a Single Param
wget https://s3-us-west-2.amazonaws.com/kloudcover-tools/binaries/ssm_get_parameter
chmod +x ssm_get_parameter

# If running alpine linux, run `apk add ca-certificates`
export MY_SECRET=$(./ssm_get_parameter --name /dev/my-secret)

echo $MY_SECRET
# SECRET
Get all params in a path and set as ENV vars
# Get the executable
wget https://s3-us-west-2.amazonaws.com/kloudcover-tools/binaries/ssm_get_parameter
chmod +x ssm_get_parameter

# If running alpine linux, run `apk add ca-certificates`

# set all vars in a path
eval $(./ssm_get_parameter --path /<secret-path>)
echo $SECRET_PATH_RESULT_1
/# secret1
echo $SECRET_PATH_RESULT_2
/# secret2

Flags

Flag Name Default Description
--region us-west-2 AWS Region to get Param from
--name None The SSM parameter name
--path None The SSM parameter path

Why?

Sometimes you inherit legacy software or have to shim in secrets because people don't think about storing them securely when making apps. This binary allows you to add that functionality in a shell script so that you can enable this functionality in your deployable.

About

A simple Go binary to get an AWS SSM secret or plain string

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published