AWS CodeDeploy Deployment Techniques for Lambda Functions: Instantaneous Traffic Shift

Instantaneous Traffic Shift

Prev Question Next Question

Question

You are currently managing deployments for a Lambda application via Code Deploy.

You have a new version of the Lambda function in place.

You have been told that all traffic needs to be shifted instantaneously to the new function.

Which deployment technique would you employ in CodeDeploy?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Answer - D.

The AWS Documentation mentions the following.

There are three ways traffic can shift during a deployment.

Canary: Traffic is shifted in two increments.

You can choose from predefined canary options that specify the percentage of traffic shifted to your updated Lambda function version in the first increment and the interval, in minutes, before the remaining traffic is shifted in the second increment.

Linear: Traffic is shifted in equal increments with an equal number of minutes between each increment.

You can choose from predefined linear options that specify the percentage of traffic shifted in each increment and the number of minutes between each increment.

All-at-once: All traffic is shifted from the original Lambda function to the updated Lambda function version at once.

Because of the options present in the documentation, all other options become invalid.

For more information on deployment configurations, please refer to the below URL-

https://docs.aws.amazon.com/codedeploy/latest/userguide/deployment-configurations.html

The deployment technique that should be used in this scenario is "All-at-Once" (Option D).

In the "All-at-Once" deployment technique, the new version is deployed to all instances simultaneously, and all traffic is shifted instantly to the new version. This method is suitable when the Lambda function has a small or negligible impact on the overall system performance and does not require any special attention during deployment.

Canary deployment (Option A) is a deployment technique that gradually introduces the new version to a small subset of users to test its functionality and performance before rolling out the update to the entire user base. This technique is suitable for critical applications where any unexpected behavior or errors could cause significant issues for users.

Gradual deployment (Option B) is a deployment technique that introduces the new version gradually to a small percentage of users and slowly increases the traffic to the new version over time. This method is suitable for applications that require additional time for testing and validation before being rolled out to the entire user base.

Linear deployment (Option C) is a deployment technique that introduces the new version to a small percentage of users and gradually increases the traffic to the new version over time in equal increments. This technique is suitable for applications where there is a need to manage traffic to the new version and gradually test its functionality and performance.

In summary, "All-at-Once" deployment technique (Option D) is the most suitable option for this scenario because the requirement is to shift all traffic instantaneously to the new Lambda function.