DVA-C02 - Deployment - Section 3.3

Manage AWS Lambda versions and aliases, including weighted aliases, to route traffic and support staged deployments.

Publish immutable AWS Lambda versions to snapshot function code and configuration, and use Lambda aliases as stable pointers that application clients invoke. Configure weighted aliases to split traffic between two versions during canary or staged rollouts without changing downstream call targets.

Lambda versionsLambda aliasesWeighted aliasesFunction version routing

Practice question for this objective

Free sampleDeploymentmedium

A developer is editing a Lambda function and wants to use a weighted alias to send a slice of traffic to the brand-new code while most traffic stays on the current stable code. The new code currently exists only as the editable draft. What must the developer do before a weighted alias can split traffic between the two code states?

  • AAdd $LATEST as the additional version on the alias with a small weight, because Lambda treats the draft as an implicit version that weighting can address directly.
  • BPublish the draft as a numbered version, because a weighted alias can only split traffic between two published versions and cannot route any portion of traffic to $LATEST. Correct
  • CCreate a second alias on the draft and weight the first alias against the second one, because weighting is expressed between two aliases rather than between versions.
  • DEnable the function's auto-publish setting so every saved draft becomes a version, then weight the alias against the most recent automatic version.
Publish a numbered Lambda version before weighting an alias, because weighted aliases route only between published versions and never to $LATEST. A weighted Lambda alias distributes invocations between a primary published version and one additional published version, and $LATEST is never a permitted weighting target, so the editable draft must first be published into an immutable numbered version before the alias can shift any fraction of traffic to it.

Why A is wrong: Lambda does not let an alias weight traffic to $LATEST at all, so naming the draft as the additional version is rejected and no split between the two code states occurs.

Why B is correct: A weighted alias references a primary published version plus one additional published version, and $LATEST is not a valid weighting target, so the draft must be published before the alias can route to it.

Why C is wrong: Weighting is configured between two published versions inside a single alias, not between two separate aliases, so this misstates the routing model and an alias still cannot point at the draft.

Why D is wrong: There is no auto-publish toggle that snapshots each save, and a version exists only when the developer explicitly publishes one, so this option relies on behaviour Lambda does not offer.

See more DVA-C02 practice questions, answers explained.

More in this domain

Back to all Deployment objectives, or the DVA-C02 cert hub.

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