Last active
December 11, 2023 11:40
-
-
Save bboure/10a084ca30d442eae8ea6b622171681e to your computer and use it in GitHub Desktop.
Delete SSM parameters by path prefix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws ssm get-parameters-by-path --path '/path/to/prams' --recursive \ | |
| jq .Parameters[].Name \ | |
| xargs -L1 -I'{}' aws ssm delete-parameter --name {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This doesn't require
jq
to be installed, also adding-t
helps to see what are you actually deletingTip
Better to use a role or user with restricted by-path permissions to avoid removing undesired keys