Deprecate an Amazon EC2 AMI

 




Introduction

You can mark an AMI as deprecated to show that it is outdated and should be avoided. Additionally, you can set a future date for the deprecation of an AMI, signaling when it will no longer be considered up to date. After an AMI is deprecated:

  • For AMI users, the deprecated AMI does not appear in DescribeImages API calls unless you specify its ID or specify that deprecated AMIs must appear. AMI owners continue to see deprecated AMIs in DescribeImages API calls.

  • For AMI users, the deprecated AMI is not available to select via the EC2 console.

  • For AMI users, if you know the ID of a deprecated AMI, you can continue to launch instances using the deprecated AMI by using the API, CLI, or the SDKs.

  • Launch services, such as launch templates and Auto Scaling groups, can continue to reference deprecated AMIs.

  • EC2 instances that were launched using an AMI that is subsequently deprecated are not affected, and can be stopped, started, and rebooted.

You can deprecate both private and public AMIs.

Costs

When an AMI is deprecated, it is not removed. The owner of the AMI will still incur charges for the snapshots associated with it. To cease the charges for these snapshots, the AMI owner must delete the AMI themselves.

Considerations

  • To deprecate an AMI, you must be the owner of the AMI.

  • AMIs that have not been used recently to launch an instance might be good candidates for deprecation or deregistering.

  • You can create Amazon Data Lifecycle Manager EBS-backed AMI policies to automate the deprecation of EBS-backed AMIs.

  • By default, the deprecation date of all public AMIs is set to two years from the AMI creation date. You can set the deprecation date to earlier than two years. To cancel the deprecation date, or to move the deprecation to a later date, you must make the AMI private by only sharing it with specific AWS accounts.

Deprecate an AMI

You have the ability to deprecate an AMI at a designated date and time. It is necessary for you to be the owner of the AMI. The maximum limit for the deprecation date is 10 years from the current date, unless it is a public AMI, in which case the limit is 2 years from the creation date. Specifying a date that has already passed is not allowed.

Conclusion

Amazon EC2 AMI is deprecated with the help of above methods.


 

 

 




























Comments

Popular posts from this blog

Deployment (Part 3)

Deployment (Part 1)

Deployment (Part 2)