What is the recommended way to update the container agent on an Amazon ECS-optimized AMI?

A cluster is built with CloudFormation templates. It runs for 6 months. New AWS features are launched that require a newer ECS container agent. How to update them without interrupting production? Say you have 12 EC2 clusters each with 2 EC2s running.

I know we can just manually delete running cluster members one by one. But what way do you recommend?

Hi @jhoadley

We release new versions of the templates regularly. When we update the AMIs, we also update the ECS agent. If you update your cluster stack with a new template version you will automatically roll out that new ECS agent in a rolling fashion (one instance at a time).

You can also use the ECS build in way to update the agent. Learn more here: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/agent-update-ecs-ami.html