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 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南