AWS › Amazon ECS (Elastic Container Service)

What deployment strategies does ECS support for updating running services with minimal downtime?

Advanced

Answer

ECS supports rolling updates by default, gradually replacing old tasks with new ones while maintaining a minimum healthy percentage, and it also integrates with AWS CodeDeploy to support blue green deployments, where an entirely new set of tasks is launched alongside the old ones, traffic is gradually or instantly shifted to the new version, and the old tasks are terminated only after the new version is confirmed healthy.
aws deploy create-deployment --application-name my-ecs-app --deployment-group-name my-deployment-group --revision file://appspec.yaml
Real-world example A payment processing company uses blue green deployments through CodeDeploy for its ECS service, allowing it to instantly roll back to the previous stable version if any errors are detected immediately after a new deployment goes live.

Common follow-ups: What is the difference between a rolling update and a blue green deployment?;How does CodeDeploy verify a new deployment is healthy before shifting all traffic?