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
feita há 2 anos4030 visualizações
2 Respostas
2
Resposta aceita

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/

respondido há 2 anos
profile pictureAWS
ESPECIALISTA
avaliado há 2 anos
0

Hi, it fixed, it was a region problem!

profile picture
respondido há 2 anos

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas