List AWS Parameter Store Values in the Command Line in a Table
Today I want to show a very simple snippet for AWS, again. I am currently starting to configure our services with AWS Systems Manager Parameter Store instead of managing the configuration files in each AMI manually. It works well so far, but for some reason the AWS Web Console does not include the configuration value in the tabular overview. So, getting a quick overview over all defined values is not possible.
Thus, I have written an extremely short script to fetch the values for a specific path prefix from the API and show them in the terminal in a tabular layout:
#!/usr/bin/env bash
region=$1
prefix_path=$2
aws --region $region ssm get-parameters-by-path --recursive --path "$prefix_path" \
| jq -r '.Parameters[] | [.Name, .Value] | @tsv' | column -t
The script has two input parameters, the region of the Parameter Store and the path
prefix. For example the following call can then show all configuration values for
one deployment of service MyService
in eu-central-1
:
./parameter-store-values.sh eu-central-1 /Prod/MyService