DOP-C02 - SDLC Automation - Section 1.7

Implement canary and linear deployment strategies for AWS Lambda and serverless applications using AWS CodeDeploy, the AWS Serverless Application Model and Amazon API Gateway stages.

Configure canary and linear traffic-shifting for AWS Lambda functions using AWS CodeDeploy and the AWS Serverless Application Model, and control stage-level routing with Amazon API Gateway stages. Weigh canary against linear strategies based on acceptable blast radius during a serverless release.

AWS LambdaCanary deploymentAWS Serverless Application ModelAPI Gateway stages

Practice question for this objective

Free sampleSDLC Automationhard

A team runs a REST API on Amazon API Gateway with a single production stage that integrates with backend services. They want to release a new deployment to that stage but expose it to only five percent of production requests first, measuring the new behaviour against the existing one on the same stage before promoting it to all traffic. They want this handled by API Gateway itself rather than by duplicating the stage. Which approach achieves this?

  • ACreate a second API Gateway stage for the new deployment and place an Amazon Route 53 weighted record in front of both stages, sending five percent of DNS resolutions to the new stage endpoint.
  • BEnable a usage plan with a five percent throttle on the production stage so that only one in twenty requests reaches the new deployment while the rest are rejected and retried against the old behaviour.
  • CEnable a canary release on the production stage and set the canary percentTraffic to five, so API Gateway sends five percent of requests to the new deployment and the rest to the current one on the same stage. Correct
  • DDeploy the new version to a separate Lambda alias and attach a CodeDeploy canary deployment preference, letting CodeDeploy shift five percent of the Lambda traffic while the API Gateway stage stays unchanged.
Use an Amazon API Gateway stage canary release with percentTraffic to split production requests between a current and a canary deployment on one stage. An API Gateway stage can carry a canary deployment alongside its current deployment; the canary percentTraffic setting determines what share of incoming requests API Gateway routes to the canary, enabling a per-request percentage release on a single stage without duplicating it.

Why A is wrong: A weighted Route 53 record can split traffic between two endpoints, but it requires duplicating the stage and shifts at DNS resolution granularity rather than per-request, which the team explicitly wanted to avoid.

Why B is wrong: A usage plan throttle limits request rate and returns throttling errors once exceeded; it does not split traffic between two deployments on a stage, so it cannot perform a percentage canary release.

Why C is correct: API Gateway stage canary settings let a stage hold both a current and a canary deployment, and percentTraffic controls the share routed to the canary, giving a per-request five percent split with no duplicate stage.

Why D is wrong: A Lambda CodeDeploy canary shifts traffic at the function alias, not at the API Gateway stage, so it does not provide the stage-level canary release the scenario asks API Gateway to perform.

See more DOP-C02 practice questions, answers explained.

More in this domain

Back to all SDLC Automation objectives, or the DOP-C02 cert hub.

Examworthy is not affiliated with or endorsed by Amazon Web Services. Original, blueprint-aligned practice material only.