AMI not found error in Terraform

0

HI,

I wanted to created EC2 instance in EU-WEST-1 region in Terraform. When I use official AMI ami-0d71ea30463e0ff8d I see the below error? Error launching source instance: InvalidAMIID.NotFound: The image id '[ami-0d71ea30463e0ff8d]' does not exist.

I tried different AMIs and different Regions, but error is always the same.

profile picture
已提问 2 年前4030 查看次数
2 回答
2
已接受的回答

Hi there

From the note I understand you wanted to created EC2 instance in EU-WEST-1 region in Terraform. When you use official AMI ami-0d71ea30463e0ff8d you see the below error? Error launching source instance: InvalidAMIID.NotFound: The image id '[ami-0d71ea30463e0ff8d]' does not exist. Please correct me if my understanding is wrong.

Please note this can be cause by working in different region. Check if the AMI is in the same region where you want to create an instance. This allows you to more easily specify the type of AMI you want and have Terraform automatically use that AMI, including the option to have it automatically update the AMI in use when newer AMIs matching your criteria are available. It will also make it easier to manage using the same AMI in different regions as the AMI ID is different for each region it is copied to.

Reference

https://aws.amazon.com/premiumsupport/knowledge-center/ec2-ami-error-not-public/ https://aws.amazon.com/premiumsupport/knowledge-center/ec2-instance-launch-copied-ami/

已回答 2 年前
profile pictureAWS
专家
已审核 2 年前
0

Hi, it fixed, it was a region problem!

profile picture
已回答 2 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则