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
- Advanced parameters (with policies)
- 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
policy create named parameter policy
profile switch the active AWS credentials profile
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/Daenerys value="Khaleesi" type=String description="Mother of Dragons"
/> policy RobbStarkExpiration Expiration(Timestamp=2013-03-31T21:00:00.000Z)
/> policy ReminderPolicy ExpirationNotification(Before=30,Unit=days) NoChangeNotification(After=7,Unit=days)
/> put name=/House/Stark/Robb value="King in the North" type=String policies=[RobbStarkExpiration,ReminderPolicy]
/> profile
default
/> profile project1
/> profile
project1
/> 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
- Ensure you have at least go v1.12
$ go version
go version go1.12 linux/amd64
- Ensure your
$GOPATH
exists and is in your$PATH
export GOPATH=$HOME/go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
- Run
go get github.com/bwhaley/ssmsh
- Run
cd $GOPATH/src/github.com/bwhaley/ssmsh && make
to build and install the binary to$GOPATH/bin/ssmsh
Tool | Description |
---|---|
Chamber | A tool for managing secrets |
Parameter Store Manager | A GUI for working with the Parameter Store |
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 |