A blue/green deployment is being configured for an existing three-tier app running on EC2 behind an ALB with Auto Scaling groups. Blue and green environments each have their own launch templates, Auto Scaling groups, and ALB target groups. Traffic for www.example.com currently points to the ALB. The deployment must switch all traffic at once from blue to green. What sequence achieves this?
Choose an answer
Tap an option to check your answer.
Correct answer: Perform a rolling restart of the green environment's Auto Scaling group to deploy the new version to green instances. After the restart finishes, use the AWS CLI to update the ALB to route traffic to the green target group..
Why this is the answer
The correct sequence for a blue/green deployment switching all traffic at once involves first preparing the new environment (green) and then redirecting traffic. Performing a rolling restart of the green Auto Scaling group ensures that all instances in the green environment are running the new application version before any traffic is directed to them. Once the green environment is fully updated and stable, updating the ALB to route traffic to the green target group instantly switches all incoming requests to the new version. The other options are incorrect because: Updating the ALB to route traffic to green before the green environment is updated would send traffic to old or unconfigured instances. Updating the blue environment's launch template and restarting blue instances is not a blue/green strategy; it modifies the active environment, which can cause downtime or issues during deployment. Changing the Route 53 record to point to a new ALB endpoint would require a separate ALB for the green environment, which is not specified in the problem, and DNS propagation can be slow, preventing an "all at once" switch.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed