Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot deregister AMI from AWS, "an error occurred attempting to deregister amis". Does anyone know the reason and provide a solution?

I am attempting to clear my snapshots and AMI from AWS account, to delete snapshots i understand one needs to de-register the AMIs. But when i try to de-register through console, i am given the below error. "an error occurred attempting to deregister amis"

Anyone has an idea about this issue?

like image 876
LakshayK Avatar asked Dec 15 '16 06:12

LakshayK


People also ask

How do I deregister an AWS AMI?

Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/ . In the navigation pane, choose AMIs. Select the AMI to deregister, and take note of its ID—this can help you find the snapshots to delete in the next step. Choose Actions, Deregister AMI.

How do I protect my AMI from deletion?

Put the AMI in a separate AWS account where users can access it (via sharing), but have no permission to delete it.

How do I know if AMIs is shared?

Find a shared AMI (console)Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/ . In the navigation pane, choose AMIs. In the first filter, choose Private images. All AMIs that have been shared with you are listed.


2 Answers

I had the same problem (and I've seen it reported on AWS forums too). The issue is that the console doesn't refresh after you deregister the AMIs. Thus they are deregistered the first time, but they are still listed as if they are there. If you try to deregister them again it fails and gives the warning (as they were already deregistered).

Solution: after clicking 'deregister' click the 'refresh' button at the top right corner of the console (at the same level as the 'Actions' drop down).

like image 125
Alistair H Avatar answered Oct 24 '22 22:10

Alistair H


I had the same problem, but even getting this error message, the AMIs got de-registered. Then I was able to delete snapshots.

You may have success trough eb cli. I've found this tutorial from AWS (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/deregister-ami.html)

like image 22
Marco Arruda Avatar answered Oct 24 '22 22:10

Marco Arruda



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!