How to Get the Latest OS AMI Id in AWS using Terraform
6 min readJan 16, 2020
When we need to deploy an EC2 instance in AWS (Amazon Web Services), we will need to get the AMI (Amazon Machine Image) ID of the image based on the AWS region and operating system version.
To achieve this task, we can use the data source “aws_ami” in Terraform.