Question

Difficulty: MediumDeployment Strategy Design

An enterprise is designing a deployment pipeline for a new microservice backend consisting of Amazon API Gateway and AWS Lambda. The deployment pipeline must release updates to the Lambda function according to the following requirements:

- The new version must receive exactly 10%10\% of the incoming API traffic immediately upon deployment.
- The remaining 90%90\% of the traffic must be routed to the new version after a 1010-minute stabilization period.
- If the new version experiences elevated error rates or response latencies during this 1010-minute window, the traffic must automatically and immediately revert to the previous stable version.

Which two actions should the solutions architect combine to design this deployment strategy? (Select two.)

  1. Configure AWS CodeDeploy to use the CodeDeployDefault.LambdaCanary10Percent10Minutes deployment configuration.Answer
  2. Create Amazon CloudWatch alarms to monitor Lambda errors and API Gateway 5xx5xx errors, and configure the CodeDeploy deployment group to roll back the deployment when any alarm is triggered.Answer
  3. C
    Configure AWS CodeDeploy to use the CodeDeployDefault.LambdaLinear10Percent10Minutes deployment configuration.
  4. D
    Deploy the update using AWS CloudFormation with the UpdatePolicy attribute set to RollingUpdate, configuring a 1010-minute pause before marking the update complete.
  5. E
    Configure an Amazon API Gateway canary release deployment with a stage variable weight of 0.100.10, and use a custom AWS Lambda function to update the weight to 1.001.00 after 1010 minutes.

Answer

Configure AWS CodeDeploy to use the canary deployment configuration along with Amazon CloudWatch alarms to monitor and automatically roll back the deployment.
To satisfy the deployment requirements with minimal operational overhead, the solutions architect should use AWS CodeDeploy to manage traffic shifting for the Lambda function. The Canary 10 percent 10 minutes configuration routes 10%10\% of the traffic to the new version immediately and shifts the remaining 90%90\% after a 1010-minute testing window. By configuring CloudWatch alarms for Lambda errors and API Gateway 5xx5xx errors and attaching them to the CodeDeploy deployment group, the deployment will automatically roll back if any issues are detected.

Step-by-Step Solution

1
Select the appropriate traffic shifting pattern.
Identify that the Canary 10 percent 10 minutes pattern shifts 10%10\% of traffic immediately and the remaining 90%90\% after 1010 minutes.
This matches the requirement to test a small subset (10%10\%) for a fixed duration (1010 minutes) before promoting the version fully.
2
Establish the rollback mechanism.
Create CloudWatch alarms for Lambda errors and API Gateway 5xx5xx errors, and attach them to the CodeDeploy deployment group.
This enables native automated rollback in case performance issues occur during the 1010-minute window.

Key Concept

AWS CodeDeploy Canary Traffic Shifting with Automated Rollbacks
Rate this question