A Lambda deployment must pass automated validation before receiving production traffic, then receive 10% of traffic for five minutes before full promotion. An elevated-error CloudWatch alarm must automatically restore the previous version; which CodeDeploy configuration meets these requirements?
Show the answer
Correct answerB. A pre-traffic hook, canary traffic shifting, and alarm-triggered automatic rollback
AWhy not this: A post-traffic hook runs after traffic shifting, too late to provide the required validation gate.
BWhy this is right: Pre-traffic validation, the specified canary interval, and alarm-triggered rollback satisfy all deployment requirements.
CWhy not this: Linear shifting moves traffic in repeated increments rather than one 10% trial followed by full promotion.
DWhy not this: Alarm monitoring alone does not configure automatic restoration of the previous version.
A pre-traffic hook validates the version before production traffic, and a 10%-for-five-minutes canary configuration provides the required promotion pattern. Alarm-triggered automatic rollback restores the previous version; linear shifting instead increases traffic in repeated increments.