Search code examples
amazon-ec2amazon-ecsamazon-ami

How to programmatically determine the AWS-optimized ECS image for a given region?


I want to script EC2 creation that would join a given ECS cluster, but need to specify an AMI. I can see that I can find an AMI in the AWS documentation, but the URL requires a login to the console and thus isn't convenient to screen-scrape. Is there any other recommended resource to determine the suggested AMI?


Solution

  • You can retrieve the recommended AMI from the Systems Manager Parameter Store API or subscribe to an SNS topic for notifications when new AMIs are released.