Q: 10
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
Discussion
Its C. Exam guides and AWS docs both highlight AfterAllowTestTraffic for blue/green validation steps like this.
Probably C. AfterAllowTestTraffic is the right lifecycle hook for testing the green environment before any production traffic, and it supports rollback if your Lambda exits with an error. D is a common trap but it's too late in the process (after all traffic is shifted).
For this scenario, wouldn't C be the best fit? Using the AfterAllowTestTraffic hook in the AppSpec lets you run validation scripts right after test traffic goes to the green environment, before shifting production traffic. If tests fail, CodeDeploy can roll back automatically. That matches exactly with blue/green deployment patterns in ECS. Pretty sure this is what AWS recommends too but open if someone spots a gotcha.
Be respectful. No spam.