AWS Certified DevOps Engineer – Professional — Question 44

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 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?

Answer options

Correct answer: C

Explanation

The correct answer is C because it uses the AfterAllowTestTraffic event to run tests after the new version has been allowed to receive test traffic, ensuring that any rollback can be executed if errors occur. Options A and B test before the deployment, which does not align with the blue/green strategy's requirements for testing the 'green' version. Option D triggers tests after traffic is allowed, but it does not specify a rollback mechanism linked to errors in the testing phase.