Skip to content

Why can't my snapshot lifecycle policy delete Amazon EBS snapshots that Amazon Data Lifecycle Manager created?

2 minute read
0

I use Amazon Data Lifecycle Manager to create Amazon Elastic Block Store (Amazon EBS) snapshot lifecycle policies with a retention schedule. However, the policy doesn't delete the snapshots.

Resolution

Note: If you receive errors when you run AWS Command Line Interface (AWS CLI) commands, then see Troubleshooting errors for the AWS CLI. Also, make sure that you're using the most recent AWS CLI version.

Important: You can only use Amazon Data Lifecycle Manager to manage snapshots that you created in Amazon Data Lifecycle Manager. Verify that you set the lifecycle policy to the Enabled state.

Take the following actions based on your scenario.

You changed a lifecycle schedule name

If you changed your lifecycle schedule name, then Amazon Data Lifecycle Manager doesn't delete snapshots that you created under the previous schedule name.

To resolve, delete the snapshot for the previous schedule name.

You have an age-based retention policy

An age-based retention policy deletes up to only the last snapshot from the standard and archive tiers. The policy doesn't delete the last snapshot.

To resolve, delete the last snapshot. It's a best practice to back up the volume in case of a rollback.

If Amazon Data Lifecycle Manager is turned off or in an error state, then Amazon EBS retains snapshots and Amazon Machine Images (AMIs) from that period. This also happens when the snapshots and AMIs are set to expire during that time. To resolve, you must manually delete the snapshots or deregister the AMIs.

You have a count-based retention policy

If you delete a volume or terminate an instance that a count-based retention policy manages, then the policy no longer manages the snapshots.

To resolve, delete the last snapshot.

If you modify or remove tags associated with your resources, then Amazon Data Lifecycle Manager no longer manages the snapshot.

Note: After a count-based policy creates a snapshot and the retention number is already reached, the policy deletes the oldest snapshot. The policy also deletes the oldest snapshot if you manually delete a snapshot from a lifecycle policy with a count-based retention.

Related information

Considerations for snapshot lifecycle policies

AWS OFFICIALUpdated 4 months ago