DEV Community

drewmullen
drewmullen

Posted on • Edited on

3 1

Terraform: Common aws_ami Searches

Searching for AMI's is not fun. Here are some you might be searching for:

Amazon Linux 2 (latest):

data "aws_ami" "amazon_linux_2" {
  most_recent = true
  owners      = ["amazon"]

  filter {
    name   = "name"
    values = ["amzn2-ami-hvm-*-x86_64-ebs"]
  }
}
Enter fullscreen mode Exit fullscreen mode

Graviton 2

RHEL 7 (latest)

Thanks: @wsarwariamzn

data "aws_ami" "rhel_7" {
  most_recent = true
  owners      = ["309956199498"]

  filter {
    name = "name"
    values = ["RHEL-7.9_HVM_GA*-x86_64-0-Hourly2-GP2"]
  }
}
Enter fullscreen mode Exit fullscreen mode

Please send me more and I'll include them in this post!

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more