A retail team runs checkout on Amazon ECS Fargate behind an ALB and had a failed deploy that needed a 30-second recovery. They now require production testing of the new version and one-click shift back to the stable task set. Which deployment strategy gives instant rollback for this container service?
Select an answer to reveal the explanation.
Short Explanation
You need two checkout lanes open so you can flip shoppers back instantly. Blue/green keeps old and new task sets alive behind the ALB for live testing and one-click rollback.
Full Explanation
ECS blue/green via CodeDeploy is correct because it retains both the stable blue task set and the new green task set behind the ALB, routes isolated production test traffic through a dedicated test listener to the green task set for validation without impacting live checkout traffic, then shifts the production listener and enables one-click shift back by re-pointing the listener to the stable task set for instant recovery that meets the 30-second goal. The rolling update with circuit breaker and health-check rollback is a standard resilient pattern that replaces tasks sequentially and can auto-revert to a prior task definition, but it terminates old tasks during replacement so there is no retained stable task set or isolated test listener for production testing and recovery requires a redeployment rather than an instant listener shift. The CodeDeploy canary with linear shifting and CloudWatch rollback is widely used to limit blast radius by exposing the new version to live traffic gradually, but it validates on real user traffic rather than isolated test traffic and completes over minutes, so it cannot provide isolated production validation plus immediate full shift back. The parallel second service with ALB weighted targets is a common manual preview pattern alongside production, but it leaves traffic management and lifecycle outside CodeDeploy task set control, requiring manual target changes with no governed one-click rollback. For the exam, test listener plus retained task set and shift back signals ECS CodeDeploy blue/green, not rolling auto-rollback or gradual canary shifting, even when all mention ALB and rollback. In practice verify the CodeDeploy application, production and test listeners, target groups, AppSpec hooks, and CloudWatch alarms for approval and automatic re-route before promoting green to production.