Created
August 13, 2025 08:46
-
-
Save filipeandre/9d2b34639bd9fa581c33efa23688a229 to your computer and use it in GitHub Desktop.
Delete aws secrets without recovery
This file contains hidden or 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
#!/usr/bin/env bash | |
if [ $# -eq 0 ] | |
then | |
echo "Usage: ./`basename "$0"` region secretN..." | |
exit 2 | |
fi | |
for secret in "${@:2}" | |
do | |
aws secretsmanager delete-secret --region "$1" --force-delete-without-recovery --secret-id "$secret" | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment