CodeDeploy Blue/Green: Missing Validation Gate Between Traffic Shift and Fleet Termination
0 reputation · 26 Feb 2024, 07:57 UTC
0 reputation · 26 Feb 2024, 07:57 UTC
When using CodeDeploy blue/green deployments with an Application Load Balancer, traffic shifts from the original fleet to the replacement fleet after the BeforeAllowTraffic lifecycle hook completes. The deployment then enters a configurable termination wait period (default five minutes, maximum one hour) before the original instances are terminated. During this window there is no built-in hook that runs after live traffic reaches the green fleet but before termination begins, so application-level readiness—such as cache warm-up, downstream dependency health, or business transaction success—cannot be validated natively.
Teams must either extend the wait time blindly, add external canary analysis with manual approval, or orchestrate a separate Step Functions workflow to fill the gap. The termination wait time is a fixed countdown; it does not pause or reset based on validation outcomes. The BeforeAllowTraffic hook fires before any live traffic reaches the green fleet and cannot exercise real request paths or stateful workflows.
A thoughtful contribution can make all the difference. Be the first to share one.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.