How to Roll Back an AWS Lambda Function with Minimal User Impact?

A developer wants the ability to roll back to a previous version of an AWS Lambda function in the event of errors caused by a new deployment. How can the developer achieve this with MINIMAL impact on users?

  1. Change the application to use an alias that points to the current version. Deploy the new version of the code. Update the alias to use the newly deployed version. If too many errors are encountered, point the alias back to the previous version.
  2. Change the application to use an alias that points to the current version. Deploy the new version of the code. Update the alias to direct 10% of users to the newly deployed version. If too many errors are encountered, send 100% of traffic to the previous version. Source Reference Answer
  3. Do not make any changes to the application. Deploy the new version of the code. If too many errors are encountered, point the application back to the previous version using the version number in the Amazon Resource Name (ARN).
  4. Create three aliases: new, existing, and router. Point the existing alias to the current version. Have the router alias direct 100% of users to the existing alias. Update the application to use the router alias. Deploy the new version of the code. Point the new alias to this version. Update the router alias to direct 10% of users to the new alias. If too many errors are encountered, send 100% of traffic to the existing alias.

Community Votes

B
80%
A
20%

80% of anonymous learners picked answer B. Votes are pick records left by other test-takers — they are not the verified answer.

Community Insight

This question tests knowledge of Lambda alias traffic shifting to achieve canary deployments, where the key is minimizing user impact by limiting exposure to a new version rather than exposing all users at once.

To roll back an AWS Lambda function with minimal impact on users, use Lambda aliases with weighted traffic routing (canary deployment). This allows a small percentage of traffic to test the new version before full rollout.

Many candidates choose Option A because it describes a valid rollback mechanism using aliases and versions, but it fails the 'minimal impact' requirement since 100% of users are immediately routed to the new version before any errors are detected.

Community Discussion (10 comments)

tomchandler077 👍 5
Option B is the best choice for achieving the objective with minimal impact on users. It uses a canary deployment strategy, which allows for testing the new version on a smaller scale before a full rollout. This method provides a balance between risk management and operational simplicity, ensuring that any potential negative impacts of the new deployment are contained and easily reversible.
preachr 👍 1 Selected: B
https://docs.aws.amazon.com/lambda/latest/dg/configuring-alias-routing.html
wh1t4k3r 👍 2 Selected: B
For people voting A: you have no idea what is the traffic load to the application. Using the method described on A will affect 100% of all users all at once until you are able to rollback. B divertes 10% of traffic only than can be easly switched back and would impact only 10% of users
KennethNg923 👍 1 Selected: B
B Update the alias to direct 10% of users to the newly deployed version -> minimal impact
piipo 👍 1 Selected: B
B is best
catoteja 👍 2
B looks better
Alagong 👍 2 Selected: A
VOTE A
siheom 👍 2
SHOULD BE A
rdiaz 👍 3 Selected: B
Minimal impact
blow96 👍 1
A is correct

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

Expert Analysis

The correct answer is Option B because it leverages AWS Lambda alias traffic shifting to implement a canary deployment strategy. By directing only 10% of traffic to the newly deployed version, the developer can monitor for errors while limiting the blast radius. If issues are found, the alias can be instantly reconfigured to send 100% of traffic back to the previous version, impacting only the small subset of users who were routed to the new version.

Why Option A is incorrect: While Option A describes a functional rollback using aliases and versions, it updates the alias to point 100% of traffic to the new version immediately. This means all users are exposed to potential errors until the developer notices and reverts the alias, which violates the "minimal impact" requirement.

Why Option C is incorrect: Option C suggests deploying directly to $LATEST and switching the ARN in the application. This is operationally slow, requires application changes, and does not use Lambda's built-in versioning and aliasing features for safe deployments.

Why Option D is incorrect: Option D is overly complex and unnecessary. Creating multiple aliases and a "router" alias adds administrative overhead without providing additional benefit over the simpler approach in Option B. Lambda aliases natively support weighted traffic routing without needing a separate router alias.

Community consensus strongly supports Option B, with commenters noting that Option A exposes 100% of users to risk, while Option B's canary approach limits impact to only 10% of traffic.

Official Reference

Exam Strategy

When an AWS exam question emphasizes 'minimal impact' or 'least disruption,' look for answers involving gradual rollouts, canary deployments, or traffic shifting. Avoid options that expose all users to a change simultaneously, even if the rollback mechanism itself is valid.

Related Analysis

Practice All DVA-C02 Questions

Access 100 questions with complete answers and detailed explanations.

View Full DVA-C02 Practice Test →

← Back to DVA-C02 Study Guide