How can I recover an accidentally deleted AMI?

Last updated: 2020-04-20

I accidentally deleted my Amazon Machine Image (AMI). How can I recover it?

Short Description

It isn't possible to restore or recover a deleted or deregistered AMI. However, you can create a new, identical AMI using one of the following:

  • Amazon Elastic Block Store (Amazon EBS) snapshots that were created as backups.
  • Amazon Elastic Compute Cloud (Amazon EC2) instances that were launched from the deleted AMI.

Note: For security and privacy reasons, AWS Support doesn't have visibility or access to customer data. If you don't have backups of your deleted AMI, AWS Support can't recover it for you. For more information on the security of customer data, see Shared Responsibility Model.

Resolution

Restore the AMI from an EBS snapshot

When you delete or deregister an Amazon EBS-backed AMI, any snapshots created for the volume of the instance during the AMI creation process are retained. If you accidentally delete the AMI, you can launch an identical AMI using one of the retained snapshots.

For instructions on how to create an AMI from a snapshot, see Creating a Linux AMI from a snapshot.

Restore the AMI from an EC2 instance

If you deleted the AMI and the snapshots are also deleted, then you can recover the AMI from any existing EC2 instances launched using the deleted AMI.

  1. Open the Amazon EC2 console.
  2. Choose Instances, and then select the instance that you want to use to create the AMI.
  3. Select Actions, Image, Create Image.

For more information on how to create an AMI from an instance, see Creating a Linux AMI from an instance.