Skip to content

Instantly share code, notes, and snippets.

@filipeandre
Created August 13, 2025 08:46
Show Gist options
  • Save filipeandre/9d2b34639bd9fa581c33efa23688a229 to your computer and use it in GitHub Desktop.
Save filipeandre/9d2b34639bd9fa581c33efa23688a229 to your computer and use it in GitHub Desktop.
Delete aws secrets without recovery
#!/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