Nitesh shows you how to
clean up an EBS-backed AMI


When I attempt 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

EBS-backed Amazon Machine Images (AMIs) include EBS snapshots; if you attempt to delete an EBS snapshot associated with an active AMI, you receive this error.

First, make sure the AMI isn’t currently in use. AMIs can be used with a variety of AWS services, such as Amazon EC2, Auto Scaling, AWS CloudFormation, and more. If you delete an AMI that’s being used by another service or application, it can affect the function of that service or application.

If you no longer need the EBS snapshot or its associated AMI, first deregister the AMI, and then delete the EBS snapshot in the EC2 console:

  1. Make a note of the AMI ID in the error message.
  2. In the left navigation pane of the EC2 console, choose AMIs.
  3. Find the AMI noted in the error message, select it, and choose Deregister from the Actions menu.
    Note: If you don’t see the AMI you’re looking for, check any other AWS regions you might have used.
  4. Delete the EBS snapshot by using the EC2 console or the AWS CLI.

Did this page help you? Yes | No

Back to the AWS Support Knowledge Center

Need help? Visit the AWS Support Center

Published: 2016-10-04