By using AWS re:Post, you agree to the AWS re:Post Terms of Use

Why do I get the error "The snapshot is currently in use by an AMI" when I try to delete my EBS snapshot?

2 minute read
2

When I delete an Amazon Elastic Block Store (EBS) snapshot, I receive the following error: "snap-########: The snapshot snap-######## is currently in use by ami-########".

Resolution

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

EBS-backed Amazon Machine Images (AMIs) include EBS snapshots. If you try to delete an EBS snapshot that's associated with an active AMI, then you receive this error.

Note: You can't delete public snapshots. If you try to delete a public snapshot, you receive an "unknown error occurred" message.

If you don't need the EBS snapshot or its associated AMI, then use the Amazon Elastic Compute Cloud (Amazon EC2) console to deregister the AMI. After you deregister the AMI, use the Amazon EC2 console or AWS CLI to delete the EBS snapshot.

Complete the following steps to delete the EBS snapshot:

  1. Note the AMI ID in the error message.
  2. Open the Amazon EC2 console, and from the navigation pane, choose AMIs.
  3. Choose the AMI that you noted in the error message, open the Actions menu, and then choose Deregister AMI.
    Note: If the AMI isn't active, then it doesn't appear in the default view. For more information, see Describe disabled AMIs. If the AMI isn't active and you still don't see the AMI, then check the other AWS Regions that you use.
  4. Use the EC2 console or the AWS CLI to delete the EBS snapshot.

Related information

Deregister (delete) an AMI

AWS OFFICIAL
AWS OFFICIALUpdated 4 months ago
6 Comments

Helped me. Thanks.

profile picture
replied a year ago

Failed to delete snapshot. snap-029b12198046d004c: The snapshot snap-029b12198046d004c is currently in use by ami-06f03ed7286ffff49 ami is already deregister and there is no ami attached to that snapshot. Region selected is also correct. Still got error and I cannot delete snapshot. Please help me.

replied a year ago

Thank you for your comment. We'll review and update the Knowledge Center article as needed.

profile pictureAWS
EXPERT
replied a year ago

Same problem.

**Failed to delete snapshot. *

snap-059ed0affc2369507: The snapshot snap-059ed0affc2369507 is currently in use by ami-030da7a9262e83c04**

But I don't have active AMI's in any region!!! I have deleted them all.

replied a year ago

The AMI could be disabled. Disabled AMIs don't show up in the console or the DescribeImages API by default. There are instructions here for how to find them: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/disable-an-ami.html#describe-disabled-ami

AWS
replied a year ago