Learning about AWS EC2’s AMI IDs
Finding the AMI ID of AMI.

Learning about AWS EC2’s AMI IDs

We all use AMIs almost daily while working on AWS EC2 or other compute services of AWS. We also know that the scope of EC2 is regional but how many of us know that AMIs are regional too and no 2 AMIs can have the same AMI ID?

Having doubts?? Let’s explore, Go to EC2 Console, Click on Launch Instance, choose any AMI, copy the AMI ID from the Console, and then

Let’s go to another region, you can open 2-3 regions in different tabs for the sake of confirmation.

Try searching for the?AMI ID in your new Region under EC2 Console.


AMI Search result in another region

?

You can see in the search result, that the same AMI ID is not available in any other, though the same/similar AMI type is available in other regions.

?

What does AWS have to say about it:

When resources are created, we assign each resource a unique resource ID. A resource ID takes the form of a resource identifier (such as snap for a snapshot) followed by a hyphen and a unique combination of letters and numbers.

Source: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/resource-ids.html

?

Why I should know this?

1.????? You will need this knowledge during IT Automation learning/working with tools like Terraform/Pulumi and Ansible.

2.????? When we create Launch Templates in EC2 when we are adding an AMI type, basically we add AMI ID in the Launch template. So, if the AMI is missing after the Launch template is being used, It will through an Error message.

3.????? Have you tried replacing the OS of the EC2 instance after launching it? Wait for my next blog.

4.????? Additional use cases, please suggest in the comment box.

?


Launch Template Screenshot


Use of AMI ID during Autoscaling Template Creation.

?

要查看或添加评论,请登录

社区洞察

其他会员也浏览了