Skip to content

Instantly share code, notes, and snippets.

@kjm0001
Forked from bboure/delete-ssm-by-path.sh
Created July 7, 2022 16:58
Show Gist options
  • Save kjm0001/cbc7c39761f72a3376faee329745c45e to your computer and use it in GitHub Desktop.
Save kjm0001/cbc7c39761f72a3376faee329745c45e to your computer and use it in GitHub Desktop.
Delete SSM parameters by path prefix
aws ssm get-parameters-by-path --path '/path/to/prams' --recursive \
| jq .Parameters[].Name \
| xargs -L1 -I'{}' aws ssm delete-parameter --name {}
@kjm0001
Copy link
Author

kjm0001 commented Jul 7, 2022

aws ssm get-parameters-by-path --path '/path/to/prams' --recursive \ | jq '.Parameters[].Name' \ | xargs -L1 -I'{}' aws ssm delete-parameter --name {}
(with '' on the jq command) worked for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment