AWS

How to Delete AWS AMIs

An Amazon Machine Image is the package with the information required to launch the AWS EC2 instances. Through a single AMI, multiple EC2 instances can be created. Users normally delete the AMI when creating or launching an instance is no longer required.

Deleting the AMI does not cause any harm to the instances or snapshots associated with it. This means that if an AMI is deleted, the EC2 instances that were created through that AMI will still exist the same way. The snapshots will also not be deleted after the deletion of their respective AMI.

Process of Deleting the AWS AMI

Deleting the AMI is a very simple process and just requires a few clicks. Let’s discuss the whole deletion process in detail.

Firstly, log in to the console if not already logged in. Search for the EC2 in the services of the AWS or simply select from the services that are visible.

In the left-hand side dashboard, click on the AMIs written under the heading of Images.

To delete an AMI, click on that AMI.

Here, we select the AMI named AMI AWS.

Click on the Deregister AMI from the Actions dropdown.

A wizard will appear to confirm the deletion of the selected AMI. Click on the Deregister AMI from the Actions dropdown.

The next interface displays a success message that the AMI has successfully been deregistered or deleted.

AMI has successfully been deleted.

It has already been mentioned that the deletion of AMI does not affect its snapshots. So, if anyone wants to remove also the snapshots associated with that AMI, simply follow the procedure given below:

Deleting Snapshots of AMIs

The snapshot of the deleted AMI remains in the Snapshots option even after refreshing the page, users can manually delete it.

Go to the snapshots from the left-side dashboard. There will be displayed all the snapshots of the AMIs. We can notice that the snapshot of the deleted AMI still exists.

Select the snapshot of the AMI that has been deleted.

Select Delete snapshot from the dropdown of the Actions button in order to permanently remove that snapshot from the list.

A wizard will appear for confirmation. Confirm the deletion by clicking on the Delete button.

A success message will indicate the deletion of the selected snapshot.

The deletion or deregistration of the AMI as well as its snapshot, has been completed.

Similarly, if users want to delete the instances associated with the AMI, they can manually delete them.

Conclusion

An AWS AMI can easily be deleted within seconds by just viewing the list of AMIs, selecting the AMI, and deregistering it. Although deletion must not be done without thinking, it is completely safe to deregister or delete the AMI as it does not delete the instances or snapshots associated with it. All steps for deleting the AMI have been covered in the article.

About the author

Abdul Mannan

I am curious about technology and writing and exploring it is my passion. I am interested in learning new skills and improving my knowledge and I hold a bachelor's degree in computer science.