CertKeen

AWS Developer Associate (DVA-C03) · Free practice question 9 of 12

Test traffic hook in ECS blue/green

Hambledon Media uses CodeDeploy blue/green deployments for an ECS service with a production listener and a test listener. They want automated integration tests to run against the replacement task set through the test listener before any production traffic shifts. Which appspec hook should invoke the test Lambda function?

  1. A.AfterAllowTestTraffic
  2. B.AfterAllowTraffic
  3. C.ApplicationStart
  4. D.BeforeAllowTraffic on the original task set
Show answer and explanation

Correct answer: A. AfterAllowTestTraffic

Why: In ECS blue/green deployments, AfterAllowTestTraffic runs after the test listener routes traffic to the replacement task set, so tests can run before production traffic moves. BeforeAllowTraffic runs later, just before production traffic shifts, and AfterAllowTraffic runs after it has shifted. ApplicationStart is an EC2/On-Premises hook, not an ECS one.

More free AWS Developer Associate (DVA-C03) questions