AWS Backup - Vault cannot be deleted? Use this script!
With AWS Backup, it is simple to create snapshots of EBS, EFS, and more. A retention period defines the number of recovery points stored within a backup vault. When removing a backup vault, you need to delete all recovery points first. Doing so is a cumbersome process. Read on to learn how to automate that task.
Tried to delete a backup vault and got the following error message?
Backup vault cannot be deleted (contains 99 recovery points).
Check out the following script to avoid deleting recovery points manually.
Hej, Andreas & Michael here!
We launched the cloudonaut blog in 2015. Since then, we have published 325 articles: small tips and tricks, best practices, and service reviews. We enjoy writing about all things AWS a lot.
Do you like our blog posts and podcast episodes? Have you learned something new? Consider supporting us create in-depth and independent AWS content. Please help us with a monthly or one-time payment through GitHub Sponsors.Start supporting us today!
Make sure that to install the AWS CLI on your machine before you proceed.
The following script asks for the vault name you want to empty, fetches a list with the recovery points belonging to the backup vault, and deletes the recovery points.
The script saved me hundreds of manual steps. I hope you will enjoy it as well!