Talks AWS re:Invent 2025 - Build safe and resilient deployment pipelines for Amazon ECS (CNS353) VIDEO
AWS re:Invent 2025 - Build safe and resilient deployment pipelines for Amazon ECS (CNS353) Building Safe and Resilient Deployment Pipelines for Amazon ECS
Overview of ECS Deployments
ECS services are defined through a combination of a task definition and service configurations
Task definitions capture details about the container image, networking, environment variables, etc.
When deploying a new version, a new task definition is created and combined with service configurations to form a new service revision
The progression from one service revision to the next is tracked in a service deployment object
Rolling Update Deployment Strategy
Allows gradual replacement of tasks running the old version with tasks running the new version
Key parameters:
Minimum health percent: Lower bound on number of tasks during deployment to maintain service availability
Maximum percent: Upper bound on number of tasks during deployment to balance availability, speed, and cost
Process:
Start with all tasks running the old version
Gradually add new tasks running the new version
Terminate old tasks as new tasks are added
Allows deploying new versions without downtime, but rollback may take longer
Blue-Green Deployment Strategy
Maintains two parallel environments: "Blue" (old version) and "Green" (new version)
Deployment process:
Scale up the "Green" environment with new version tasks
Shift test traffic to the "Green" environment for verification
Shift production traffic to the "Green" environment
"Bake" the new version for a defined period
Clean up the "Blue" environment
Provides quick rollback capability by switching back to the "Blue" environment
Requires more infrastructure (two environments) but reduces deployment risk
Customizing Deployment Workflows
Use lifecycle hooks (Lambda functions) to add custom logic at different stages of the deployment
Example: Implement a manual approval workflow
At post-test traffic shift stage, Lambda function sets deployment state to "pending" and notifies a reviewer
Reviewer tests the new version on the test listener and approves or rejects
Lambda function checks the approval state and returns success or failure to progress the deployment
Key Takeaways
ECS provides multiple deployment strategies (rolling update, blue-green, linear, canary) with different trade-offs
Blue-green deployments offer reduced risk and quick rollback, but require more infrastructure
Lifecycle hooks allow customizing the deployment workflow, e.g., adding manual approval steps
Additional resources and hands-on workshops available to learn more about blue-green deployments
Your Digital Journey deserves a great story. Build one with us.