Accelerating Software Delivery with Amazon ECS Advanced Deployments
Overview
Presentation covered advanced deployment strategies in Amazon ECS, including benefits, technical details, and real-world use cases.
Key focus was on how ECS customers can leverage advanced deployment features to improve delivery velocity while maintaining high availability and reliability.
ECS Deployments Primer
ECS services are defined by two key components:
Task definition: Defines a unit of work, a single task within a service
Service configuration: Specifies how to deploy one or more tasks to perform a function
The process of going from initial service revision to the next is an ECS deployment.
Deployment Controllers and Strategies
ECS provides three deployment controller options:
ECS native controller (focus of this presentation)
CodeDeploy
External (custom deployment management)
ECS supports four deployment strategies:
Rolling (default)
Blue/Green
Canary
Linear
Advanced Deployment Lifecycle
Pre-Scale Up: Allows running custom logic (e.g. admission checks) before scaling up new tasks.
Scale Up: Scales up the new "green" environment.
Post-Scale Up: No traffic shifted yet, both "blue" and "green" environments running.
Test Traffic Shift: Shifts test traffic to the new "green" environment.
Post-Test Traffic Shift: Allows running tests/checks on the "green" environment.
Production Traffic Shift: Shifts production traffic to the "green" environment.
Can be done all at once (Blue/Green), in two stages (Canary), or gradually (Linear).
Post-Production Traffic Shift: "Blue" environment kept running for a configurable "bake time" in case rollback is needed.
Clean Up: "Blue" environment scaled down, "green" becomes the new "blue" for next deployment.
Deployment Strategies in Action
UI and Catalog Service: Used Blue/Green for UI, Canary for Catalog to enable gradual rollout and testing.
Leveraged ALB's advanced request routing for path-based routing.
Catalog Service via Service Connect: Used Canary to gradually shift test traffic, implemented performance testing hooks.
Notification Service: Headless service pulling from a queue, used Blue/Green to enable quick rollback.
Video Streaming Service: Used Blue/Green with Network Load Balancer to enable full version migration.
Choosing and Migrating Deployment Strategies
Easily switch between strategies by updating deployment configuration.
Key considerations:
Speed of rollback (advanced deployments provide faster rollback)
Consistency of client experience (Blue/Green)
Need for gradual rollout and testing (Canary, Linear)
Can migrate from CodeDeploy to ECS advanced deployments by updating service definition.
Key Takeaways
ECS advanced deployments provide flexibility to optimize software delivery for various business and technical requirements.
Lifecycle hooks enable custom logic and testing at key deployment stages.
Supports multiple service exposure patterns (ALB, Service Connect, headless, NLB) for diverse architectures.
Enables gradual rollouts, canary testing, and quick rollbacks to maintain high availability.
These cookies are used to collect information about how you interact with this website and allow us to remember you. We use this information to improve and customize your browsing experience, as well as for analytics.
If you decline, your information won’t be tracked when you visit this website. A single cookie will be used in your browser to remember your preference.