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.
Staying ahead of the game with Amazon Web Services (AWS) is a challenge. Our weekly videos and online events provide independent insights into the world of cloud. Subscribe to cloudonaut plus to get access to our exclusive videos and online events.Subscribe now!
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!