I accidentally deleted my Amazon Machine Image (AMI). How can I recover it?
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.
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 both the AMI and the snapshots are deleted, you can recover the AMI from any EC2 instance that launched using the deleted AMI.
Note: Unless you have selected the No reboot option on the instance, performing the following procedure reboots the instance. For more information on the No reboot option, see step 6 in Creating a Linux AMI from an instance.
- Open the Amazon EC2 console.
- Choose Instances, and then select the instance that you want to use to create the AMI.
- 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.
How do I re-create a terminated EC2 instance?
How do I protect my data against accidental EC2 instance termination?