DVA-C02 - Deployment (24% of the exam) - 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.

Exam traps in Deployment

Answers that look right on this material and are not. Each one is a distractor from a different question in the DVA-C02 bank for this domain.

  • Create an alias pointing at $LATEST, since an alias preserves the exact code that existed at the moment the alias was created.

    Why it is wrong: An alias is only a movable pointer and does not freeze code, and pointing it at $LATEST means it tracks every later edit rather than capturing an immutable snapshot.

  • The routing configuration may list several additional versions, each with its own weight, so the alias can split across three or more versions at once.

    Why it is wrong: Multiple weighted versions sound flexible, but a weighted alias routes between exactly two versions: the primary version and one additional version in the routing configuration.

  • Publish version 7 again under a second alias and ask callers to send roughly one in ten invocations to that new alias instead of the prod alias.

    Why it is wrong: Splitting traffic by having clients choose between two aliases pushes routing logic onto every caller and is error prone, whereas a weighted alias performs the split centrally inside Lambda.

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