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

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン