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

Last updated: 2020-12-07

When I try to delete an Amazon Elastic Block Store (EBS) snapshot, I receive an error similar to the following:

"snap-xxxxxxxx: The snapshot snap-xxxxxxxx is currently in use by ami-xxxxxxxx"

How can I resolve this error?

Resolution

Note: If you receive errors when running AWS Command Line Interface (AWS CLI) commands, 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 associated with an active AMI, you receive this error.

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

Before you attempt to delete an EBS snapshot, make sure that the AMI isn’t currently in use. You can use AMIs with a variety of AWS services, such as Amazon Elastic Compute Cloud (Amazon EC2), AWS Auto Scaling, AWS CloudFormation, and more. If you delete an AMI that’s used by another service or application, the function of that service or application might be affected.

If you no longer need the EBS snapshot or its associated AMI, deregister the AMI. Then, delete the EBS snapshot in the Amazon EC2 console:

  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 noted in the error message, and then choose Deregister from the Actions menu.
    Note: If you don’t see the AMI that you’re looking for, check any other AWS Regions that you might have used.
  4. Delete the EBS snapshot by using the EC2 console or the AWS CLI.

Did this article help?


Do you need billing or technical support?