python3
boto3
Add line to ~/.bashrc
or ~/.bash_profile
etc.
alias f-ssm='<path>/ssm_fetcher.py'
$ f-ssm --help
usage: ssm_fetcher.py [-h] [--json] [--profile PROFILE] [--region REGION]
ssm_params [ssm_params ...]
SSM Parameter Fetcher
positional arguments:
ssm_params list of ssm parameters
optional arguments:
-h, --help show this help message and exit
--json, -j enables json output
--profile PROFILE, -p PROFILE
aws profile to use, default "default"
--region REGION, -r REGION
aws region to use, default "us-east-1"
$ f-ssm secret-url
secret-url:
secret.example.com
$ f-ssm secret-url --json
{"secret-url": "secret.example.com"}
$ f-ssm secret-url -p boto_profile
secret-url:
secret.example.com
$ f-ssm secret-url -p boto_profile -r us-west-1
secret-url:
secret.example.com
$ f-ssm private-key.pem i-dont-exist website-password
private-key.pem:
<private_key>
i-dont-exist:
website-password:
Password1234!