Skip to content

restore deleted AMI

0

Can the AWS support restore deleted AMI with the same ID? I know the following:

Please assist

P.S. The ami was deleted about 5 days ago by an accident

asked a year ago249 views

3 Answers
1

If your AMI was deleted about 5 days ago, there are two potential recovery options depending on your setup:

  1. Recycle Bin: If you had Recycle Bin enabled for AMIs, you can recover the deleted AMI with the same ID using the AWS CLI command:
aws ec2 restore-image-from-recycle-bin --image-id ami-youramiid

This would restore the AMI with its original ID, making it immediately available for use again. However, since you mentioned Recycle Bin was not set up, this option is unfortunately not available.

  1. S3 Storage: If you had previously stored your AMI in an S3 bucket using the CreateStoreImageTask API, you could restore it. However, this would require that you had proactively stored the AMI before deletion.

Without Recycle Bin enabled or a backup in S3, recovering a deleted AMI with the same ID is generally not possible. AWS Support might be able to provide assistance in some cases, especially if the deletion was very recent, but there's no guaranteed recovery method for AMIs deleted 5 days ago without any backup mechanisms in place.

For future protection, consider enabling Recycle Bin for your AMIs. Recycle Bin is a data recovery feature that allows you to restore accidentally deleted EBS snapshots and EBS-backed AMIs during a specified retention period.
Sources
Recover deleted AMIs from the Recycle Bin - Amazon EBS
RestoreImageFromRecycleBin - Amazon Elastic Compute Cloud
i want to move ami | AWS re:Post
Recover deleted Amazon EBS snapshots and EBS-backed AMIs with Recycle Bin - Amazon EBS
Is it possible to restore a deleted EC2 instance or snapshot from Lifecycle Backup | AWS re:Post

answered a year ago

EXPERT

reviewed a year ago

0

Hi Unfortunately if your recycle bin was not enabled AWS support cannot restore your AMI. A quick work around to salvaging your AMI can be to restore from a snap shot if you have taken one, you can use the following command line to check:

aws ec2 describe-snapshots --owner-ids self

Or if you have a recently launched EC2 service running using the AMI that was deleting you could create a new AMI from that machine:

aws ec2 create-image --instance-id i-idexample --name "Recovered AMI"

Hope this is useful.

answered a year ago

0

thanks for the answer but this is not quite the correct statement, i wish i can see the supporting link or so, but AWS support has the power, so i just answered my question ;-)

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.