
Answer-first summary for fast verification
Answer: By updating the Lambda function, creating an alias, and configuring traffic weights through the alias to allocate 90% to the production version and 10% to the new version.
The correct answer is D. The optimal way to gradually roll out changes to AWS Lambda function code in a production environment is to update the code and create a new version. Then, create a Lambda function alias that can manage traffic splitting between the two versions. The alias allows configuring traffic weights so that 90% of the traffic goes to the current production version and 10% to the new version. This method ensures a controlled and incremental deployment of the new code to minimize potential issues. Options A, B, and C do not provide the same level of control and are not appropriate for the described scenario.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
How can a developer implement a gradual rollout of a Lambda function update to only 10% of production users, after testing the updated code in a test environment?
A
By updating the Lambda code, creating a new version, and setting up a trigger with traffic weights to route 90% to the current version and 10% to the new version.
B
By deploying the updated code in a new Lambda function and using an alias to direct 90% of traffic to the existing function and 10% to the updated function.
C
By updating the Lambda code to a new version and using a proxy integration to split traffic, with 90% going to the production version and 10% to the updated version.
D
By updating the Lambda function, creating an alias, and configuring traffic weights through the alias to allocate 90% to the production version and 10% to the new version.