ssmsh is an interactive shell for the EC2 Parameter Store. Features:
- Interact with the parameter store hierarchy using familiar commands like cd, ls, cp, mv, and rm
- Supports relative paths and shorthand (
..
) syntax - Operate on parameters between regions
- Recursively list, copy, and remove parameters
- Get parameter history
- Create new parameters using put
- Supports emacs-style command shell navigation hotkeys
- Submit batch commands with the
-file
flag - Inline commands
- Download here or clone and build from this repo.
- Set up AWS credentials.
/>help
Commands:
cd change your relative location within the parameter store
clear clear the screen
cp copy source to dest
decrypt toggle parameter decryption
exit exit the program
get get parameters
help display help
history get parameter history
ls list parameters
mv move parameters
put set parameter
region change region
rm remove parameters
/>ls /House
Lannister/
Stark/
Targaryen/
/>cd /House
/House>ls
Lannister/
Stark/
Targaryen/
/>cd /House/Stark
/House/Stark>get JonSnow
[{
Name: "/House/Stark/JonSnow",
Type: "String",
Value: "Bastard",
Version: 2
}]
/>cd /House/Stark
/House/Stark>get VerySecretInformation
[{
Name: "/House/Stark/VerySecretInformation",
Type: "SecureString",
Value: "AQICAHhBW4N+....",
Version: 1
}]
/House/Stark>decrypt
Decrypt is true
/House/Stark>get VerySecretInformation
[{
Name: "/House/Stark/VerySecretInformation",
Type: "SecureString",
Value: "The three-eyed raven lives.",
Version: 1
}]
/>history /House/Stark/JonSnow
[{
Description: "Bastard son of Eddard",
LastModifiedDate: 2017-11-06 23:59:02 +0000 UTC,
LastModifiedUser: "bwhaley",
Name: "/House/Stark/JonSnow",
Type: "String",
Value: "Bastard",
Version: 1
} {
Description: "Bastard son of Eddard Stark, man of the Night's Watch",
LastModifiedDate: 2017-11-06 23:59:05 +0000 UTC,
LastModifiedUser: "bwhaley",
Name: "/House/Stark/JonSnow",
Type: "String",
Value: "Bastard",
Version: 2
}]
/> cp /House/Stark/SansaStark /House/Lannister/SansaStark
/> cp -R /House/Stark /House/Targaryen
/> rm /House/Stark/EddardStark
/> cd /House/Stark
/House/Stark> rm -r ../Lannister
/> put
Input options. End with a blank line.
... name=/House/Targaryen/DaenerysTargaryen
... value="Khaleesi"
... type=String
... description="Mother of Dragons"
...
/>
Alternatively:
/> put name=/House/Targaryen/DaenerysTargaryen value="Khaleesi" type=String description="Mother of Dragons"
/> region eu-central-1
/> region
eu-central-1
/>
/> put region=eu-central-1 name=/House/Targaryen/DaenerysTargaryen value="Khaleesi" type=String description="Mother of Dragons"
/> cp -r us-west-2:/House/Stark/ eu-central-1:/House/Targaryen
/> get eu-central-1:/House/Stark/JonSnow us-west-2:/House/Stark/JonSnow
$ cat << EOF > commands.txt
put name=/House/Targaryen/DaenerysTargaryen value="Khaleesi" type=String description="Mother of Dragons"
rm /House/Stark/RobStark
cp -R /House/Baratheon /House/Lannister
EOF
$ ssmsh -file commands.txt
$ cat commands.txt | ssmsh -file - # Read commands from STDIN
$ ssmsh put name=/House/Lannister/CerseiLannister value="Noble" description="Daughter of Tywin" type=string
- Flexible and improved output formats
- Release via homebrew
- Copy between accounts using profiles
- Find parameter
- update parameter (put with fewer required fields)
- Integration w/ CloudWatch Events for scheduled parameter updates
- Export/import
- Support globbing and/or regex
- In memory parameter cache
- Read parameters as local env variables
MIT
Chamber | A tool for managing secrets
Library | Use |
---|---|
abiosoft/ishell | The interactive shell for golang |
aws-sdk-go | The AWS SDK for Go |
mattn/go-shellwords | Parsing for the shell made easy |