Get latest AMI ID for AWS instance
问题 I wanted to fetch the latest ami id for AWS Linux machine while creating an ec2 instance for an autoscaling architecture. I was trying the aws cli to get the images types, but it would print out a lot of information if I used the describe-images command. My requirement was to get only the image id, so that I could use it to create a launch configuration or launch an instance with the latest ami-id. 回答1: A little-known recent feature is the ability to Query for the latest Amazon Linux AMI IDs