Amazon ECS Adds SSM Parameter for Launching ECS-Optimized EC2 Instances using AWS CloudFormation

Posted on: May 9, 2018

You can now use an Amazon EC2 Systems Manager (SSM) parameter in AWS CloudFormation to launch EC2 instances with the latest ECS-optimized Amazon Machine Image (AMI).

It is a best practice to use the latest version of the ECS-Optimized AMI when you create a new EC2 cluster for Amazon Elastic Container Service (ECS), as new releases include bug fixes and feature updates. Previously, to ensure you were using the latest AMI meant checking the AWS Documentation or subscribing to the ECS-AMI SNS topic. You then had to manually update your CloudFormation template with this ID.

Now, you can specify a SSM parameter in your CloudFormation template to dynamically fetch the latest ECS-optimized AMI image ID during EC2 instance creation. The SSM parameter can also dynamically fetch relevant AMI information such as the Docker version, ECS-agent version, and ECS-runtime version. You can use the parameter to provision both Linux and Windows AMIs to run your containers.

To learn more, visit the Amazon ECS documentation.

Please visit the AWS region table to see the AWS regions where Amazon ECS is available.