Failed to delete snapshot even after deregistering the AMI

1

Even though I already deregistered the AMI that used the snapshot I still can't delete the snapshot and instead I get the error: "Failed to delete snapshot snap-xxxxxxxxxxxxxxxxx: The snapshot snap-xxxxxxxxxxxxxxxxx is currently in use by ami-xxxxxxxxxxxxxxxxx"

asked 7 months ago471 views
3 Answers
1

Hello.

It is possible that the target AMI has not been unregistered yet, or that the update is delayed due to a time lag in the console, etc.
First, please make sure that you have successfully unregistered the AMI.
Once you have confirmed that the registration has been successfully canceled, please wait a while and try deleting the snapshot.

profile picture
EXPERT
answered 7 months ago
0
Accepted Answer

I couldn't find it under Images > AMIs, but I found it using the CLI with this command: "aws ec2 describe-images --image-ids ami-xxxxxxxxxxxxxxxxx" then I could deregister the AMI using: "aws ec2 deregister-image --image-id ami-xxxxxxxxxxxxxxxxx" after that I could remove the snapshot successfully.

answered 7 months ago
  • Hello, i had this problem too, but with urou answer i finally get delete the snapshot successfully. Tnahk you very much bro!

0

Maybe it's a feature of AWS Backup, yet it seems if an EC2 volume snapshot is occupied/busy (like for a clone) when it's time to be deleted, that's it - it gets to sit around and charge rent without any notification that I noticed that this snapshot escaped deletion and is a free bird. In other words reattempted deletion by AWS Backup is non existent it seems. So even if you resolve what was holding on to the snapshot, it still doesn't get deleted in any days that follow. Further frustration ensues as it shows as un-deletable in the EC2 > Snapshot view. When selected, the delete option for that snapshot is disabled (just like all other AWS Backup managed snapshots) even though it should be auto deleted by now. For those who are savvy enough, are blessed to realize that you need to go to the corresponding backup vault in AWS Backup and find the offending snapshot to be able to delete it. It will likely be recognized there as expired and able to be deleted from that perspective after selecting it and confirming. So in the end, a change of perspective could save you a couple of dollars.

answered 4 months 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.

Guidelines for Answering Questions