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?
- A.AfterAllowTestTraffic
- B.AfterAllowTraffic
- C.ApplicationStart
- 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
- Step Functions Retry and Catch fields
- SQS FIFO message groups for ordering
- DynamoDB Streams for change processing
- EventBridge Scheduler one-time invocations
- Explicit deny in policy evaluation
- Hardening S3 bucket access settings
- ApplyGuardrail API for any model
- Previewing stack updates with change sets
- API Gateway REST canary release
- SQS visibility timeout for Lambda consumers
- Metric filters for log-based alarms