Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export AWS_DEFAULT_PROFILE=""
- # to display parameter store variables for aws latest linux
- aws ssm get-parameters-by-path --path "/aws/service/ami-amazon-linux-latest" --region us-west-2
- # get the list of parameter store variables in the account
- aws ssm describe-parameters | jq '.Parameters[].Name'
- # remove the last path and filter higher level path
- aws ssm describe-parameters | jq '.Parameters[].Name' | sed -e 's,\(.*\)/.*,\1",g' | sort | uniq
- # display certain path values
- aws ssm get-parameters-by-path --path "/general"
- # if you know the list of parameters, aws cli itself has a way to display just the values
- aws ssm get-parameters --names "/general/environment" "/general/project" --query "Parameters[*].{Name:Name,Value:Value}"
- # if you don't you can use jq
- aws ssm get-parameter --name "/general/environment" | jq -c '{Param: .Parameter.Name, Value: .Parameter.Value}'
- # to display every parameter with its value given a path
- aws ssm get-parameters-by-path --path "/general" | jq -c '.Parameters[] | {Param: .Name, Value: .Value}'
- # to display all parameters drilling down
- aws ssm get-parameters-by-path --recursive --path "/vpc" | jq -c '.Parameters[] | {Param: .Name, Value: .Value}'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement