AMI not found error in Terraform
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.
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/
Relevant questions
SNS Topic/Subscription created through Terraform not showing up
Accepted Answerasked 3 months agoError on Dashboard "An error occurred" and unable to create instance due to "Error loading AMI data".
asked a month agoAmazon Voice Focus AMI does not exist
Accepted Answerasked 5 months agocannot see my instance in EC2 dashboard or EC2 Global
asked a month agoImport from VMware to AMI successful, but instance not displaying in EC2
asked a year agoCannot delete ENI after delete the stack via Terraform
asked 5 months agoDataSync AMIs not found in US-Gov-West
asked 3 years agoNot able to login to EC2 running Oracle Linux(Custom AMI)
asked 3 years agoAMI not found error in Terraform
Accepted Answerasked 17 days agoCan we create a Table in Aurora during the infra setup using terraform IaaC code ?
Accepted Answerasked 2 months ago