Cleaning up backups - AWS Prescriptive Guidance

Cleaning up backups

To reduce costs, clean up the backups that are no longer required for recovery or retention purposes. You can use AWS Backup and Amazon Data Lifecycle Manager to automate your retention policy for a portion of your backups. However, even with these tools in place, you still need a cleanup approach for backups that are taken separately.

A tagging strategy is a prerequisite to a cleanup strategy. Use tagging to identify resources that should be cleaned up, notify owners appropriately, and automate your cleanup process. Backups created by AWS have creation dates aligned to them, but tagging is important to correlate backups to your workloads, retention requirements, and restore-point identification.

You can implement a cleanup process for snapshots using automation. For example, you can scan your account for snapshots and determine if the corresponding volumes are in an attached state or an available state. You can further filter the results on a time threshold that you specify. Using the tags attached to the volume, you can automatically send email to snapshot owners, and warning them that their snapshots have been scheduled for deletion. This automated remediation can be implemented by using AWS Config rules, a script using the AWS CLI, or a Lambda function using the AWS SDK.

Systems Manager provides the AWS-DeleteEBSVolumeSnapshots and AWS-DeleteSnapshot documents to help you initiate and automate the cleanup of Amazon EBS snapshots. You can also use the AWS CLI and AWS SDK to automate the cleanup of other AWS resources such as Amazon RDS snapshots.