An insurance firm runs its claims-intake API as a set of AWS Lambda functions defined with AWS SAM. Claims adjusters use the API during business hours, and the team releases updates several times a week.
The team wants a new version of the claim-validation function to receive 10 percent of invocations at first. The remaining traffic should move after 5 minutes if the function's error alarm stays in OK, and if the alarm fires during the shift, traffic must return to the previous version automatically.
Developers want this configured in the same template as the function, with no separate deployment pipeline to maintain.
Which change meets these requirements with the LEAST operational overhead?
Choose one answer.
AA. Set AutoPublishAlias and a DeploymentPreference of Canary10Percent5Minutes in the SAM template, and list the error alarm so that CodeDeploy rolls back when it fires.
BB. Create a Lambda alias that sends 10 percent of invocations to the new version through weighted routing, and write a Step Functions state machine that raises the weight after 5 minutes.
CC. Deploy each new version as a separate Lambda function behind its own API Gateway stage, and change the custom domain mapping to the new function after the test team signs off.
DD. Keep the function at $LATEST and set reserved concurrency to 10 on the new version, so that only a tenth of the requests can reach the new code while the old code handles the rest.
C. Wrong: Separate functions and stages make each release a full cutover rather than a gradual shift. Rolling back would need a mapping change and would not happen automatically.
SAM deployment preferences use CodeDeploy to move a Lambda alias between versions in stages and roll back when a listed CloudWatch alarm fires. Declaring it in the template keeps the canary, the wait and the alarm together with the function, and the team writes no extra orchestration. Weighted aliases need custom code, cutovers are all or nothing, and concurrency settings do not choose code versions.
Canary10Percent5Minutes sends a tenth of the traffic to the new version first, and the error alarm triggers rollback.
Want more on Lambda deployments (aliases, traffic shifting, SAM)? The 5 full-length practice sets have 7 more Lambda deployments (aliases, traffic shifting, SAM) questions, 375 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets →