nerdexam
Amazon

DOP-C02 · Question #88

A company is using AWS CodePipeline to automate its release pipeline. AWS CodeDeploy is being used in the pipeline to deploy an application to Amazon Elastic Container Service (Amazon ECS) using the…

The correct answer is C. Add a hooks section to the CodeDeploy AppSpec file. Use the AfterAllowTestTraffic lifecycle. Lifecycle event hooks for an Amazon ECS deployment: AfterAllowTraffic – Use to run tasks after the second target group serves traffic to the replacement task set. The results of a hook function at this lifecycle event can trigger a rollback.

Submitted by kim_seoul· Mar 6, 2026SDLC Automation

Question

A company is using AWS CodePipeline to automate its release pipeline. AWS CodeDeploy is being used in the pipeline to deploy an application to Amazon Elastic Container Service (Amazon ECS) using the blue/green deployment model. The company wants to implement scripts to test the green version of the application before shifting traffic. These scripts will complete in 5 minutes or less. If errors are discovered during these tests, the application must be rolled back. Which strategy will meet these requirements?

Options

  • AAdd a stage to the CodePipeline pipeline between the source and deploy stages. Use AWS
  • BAdd a stage to the CodePipeline pipeline between the source and deploy stages. Use this stage
  • CAdd a hooks section to the CodeDeploy AppSpec file. Use the AfterAllowTestTraffic lifecycle
  • DAdd a hooks section to the CodeDeploy AppSpec file. Use the AfterAllowTraffic lifecycle event to

How the community answered

(29 responses)
  • A
    3% (1)
  • B
    7% (2)
  • C
    72% (21)
  • D
    17% (5)

Explanation

Lifecycle event hooks for an Amazon ECS deployment: AfterAllowTraffic – Use to run tasks after the second target group serves traffic to the replacement task set. The results of a hook function at this lifecycle event can trigger a rollback.

Topics

#AWS CodeDeploy#ECS blue/green deployment#Lifecycle hooks#Automated testing#Rollback strategy

Community Discussion

No community discussion yet for this question.

Full DOP-C02 Practice