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.
Please support our work!
We have published 327 articles, 41 podcast episodes, and 15 videos. It's all free and means a lot of work in our spare time.
Thanks to Alan Leech, Alex DeBrie, e9e4e5f0faef, Goran Opacic, jhoadley, Shawn Tolidano, Thorsten Hoeger, Todd Valentine, Vince Fulco, and all anonymous supporters for your help! We also want to thank all supporters who purchased a cloudonaut t-shirt. It gives us great pleasure to send our t-shirts all over the world.
With your help, we can continue to produce independent & high-quality content focused on AWS. Please support us!Support us
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!