Exam DOP-C02 All QuestionsBrowse all questions from this exam
Question 226

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?

    Correct Answer: C

    The requirements specify that new instances must be launched automatically with no manual provisioning, half of the new instances should start receiving traffic at a time, and the deployment should succeed if at least half the traffic is successfully rerouted. Using a blue/green deployment ensures that a new fleet of instances is launched for the new revision, and traffic can be rerouted to half of the instances at a time using the CodeDeployDefault.HalfAtAtime configuration. The BeforeAllowTraffic hook in appspec.yml is appropriate for deleting temporary files before routing traffic to the new instances. An Application Load Balancer will ensure balanced traffic and automatic healing in case of instance failure. Terminating the original instances after deployment will also help to reduce costs immediately.

Discussion
6ef9a08Option: C

B: blue/green deployment with CodeDeployDefault.HalfAtAtime

tgv

---> C

trungtdOption: C

Automatically Copy Auto Scaling Group: This option allows launching a new fleet of instances for each deployment automatically. CodeDeployDefault.HalfAtAtime Deployment Configuration: This configuration meets the requirement of rerouting traffic to half of the new instances at a time. It ensures that the deployment succeeds if traffic is rerouted to at least half of the instances, otherwise, it fails.