nerdexam
Amazon

DOP-C02 · Question #241

A company is using AWS CodeDeploy to automate software deployment. The deployment must meet these requirements: - A number of instances must be available to serve traffic during the deployment…

The correct answer is C. Use an Application Load Balancer and a blue/green deployment. Associate the Auto Scaling. A blue/green deployment strategy with an Application Load Balancer and Auto Scaling Group is the optimal solution for zero-downtime deployments, automatic provisioning of new fleets, staged traffic shifting, and pre-traffic cleanup using CodeDeploy lifecycle hooks.

Submitted by jordan8· Mar 6, 2026SDLC Automation

Question

A company is using AWS CodeDeploy to automate software deployment. The deployment must meet these requirements:

  • A number of instances must be available to serve traffic during the deployment. Traffic must be

balanced across those instances, and the instances must automatically heal in the event of failure. - A new fleet of instances must be launched for deploying a new revision automatically, with no manual provisioning.

  • Traffic must be rerouted to the new environment to half of the new instances at a time. The

deployment should succeed if traffic is rerouted to at least half of the instances: otherwise, it should fail.

  • Before routing traffic to the new fleet of instances, the temporary files generated during the

deployment process must be deleted.

  • At the end of a successful deployment, the original instances in the deployment group must be

deleted immediately to reduce costs. How can a DevOps engineer meet these requirements?

Options

  • AUse an Application Load Balancer and an in-place deployment. Associate the Auto Scaling group
  • BUse an Application Load Balancer and a blue/green deployment. Associate the Auto Scaling
  • CUse an Application Load Balancer and a blue/green deployment. Associate the Auto Scaling
  • DUse an Application Load Balancer and an in-place deployment. Associate the Auto Scaling group

How the community answered

(33 responses)
  • A
    9% (3)
  • B
    21% (7)
  • C
    64% (21)
  • D
    6% (2)

Why each option

A blue/green deployment strategy with an Application Load Balancer and Auto Scaling Group is the optimal solution for zero-downtime deployments, automatic provisioning of new fleets, staged traffic shifting, and pre-traffic cleanup using CodeDeploy lifecycle hooks.

AUse an Application Load Balancer and an in-place deployment. Associate the Auto Scaling group

An in-place deployment updates applications on existing instances, which violates the requirement for launching a 'new fleet of instances' and does not support the specified staged traffic rerouting mechanism.

BUse an Application Load Balancer and a blue/green deployment. Associate the Auto Scaling

This option is truncated but starts identically to C, correctly identifying the use of an Application Load Balancer and blue/green deployment with an Auto Scaling Group. Without the full text, it's impossible to distinguish the specific reason it might be considered less correct than C, but the core strategy is sound.

CUse an Application Load Balancer and a blue/green deployment. Associate the Auto ScalingCorrect

Blue/green deployment is the correct strategy as it provisions a new fleet of instances for each revision and allows for staged traffic shifting (e.g., 'half of the new instances at a time') using an Application Load Balancer. Integrating with an Auto Scaling Group ensures automatic instance healing and provisioning, and lifecycle hooks (`BeforeAllowTraffic`) can be used for pre-traffic cleanup tasks.

DUse an Application Load Balancer and an in-place deployment. Associate the Auto Scaling group

An in-place deployment updates applications on existing instances, failing to meet the requirement for a 'new fleet of instances' and the advanced traffic shifting capabilities outlined in the problem.

Concept tested: AWS CodeDeploy blue/green deployment, traffic shifting, and lifecycle hooks

Source: https://docs.aws.amazon.com/codedeploy/latest/userguide/deployment-traffic-shifting.html

Topics

#AWS CodeDeploy#Blue/green deployment#Application Load Balancer#Auto Scaling

Community Discussion

No community discussion yet for this question.

Full DOP-C02 Practice