Question

Difficulty: MediumDeployment Strategy Design

A company runs a high-traffic web application on AWS Elastic Beanstalk in a load-balanced environment. The development team needs to deploy updates with minimal risk. The deployment strategy must meet the following requirements:
- A small portion of actual production traffic (10%10\%) must be routed to the new version initially.
- The new version must be evaluated using this traffic for 1515 minutes.
- If the new version exhibits issues or fails health checks during the evaluation period, the traffic must be immediately redirected back to the old version without any downtime.
- If no issues are detected, the deployment must automatically complete by routing 100%100\% of traffic to the new version.

Which deployment policy should the solutions architect configure in Elastic Beanstalk to satisfy these requirements?

  1. Configure the Elastic Beanstalk deployment policy to Traffic Splitting. Set the split percentage to 10%10\% and the evaluation time to 1515 minutes.Answer
  2. B
    Configure the Elastic Beanstalk deployment policy to Immutable. Configure a Route 53 weighted routing policy to split traffic between the old and new environments, and manually revert the weights if errors occur.
  3. C
    Configure the Elastic Beanstalk deployment policy to Rolling with additional batch. Set the batch size to 10%10\%, set the evaluation time to 1515 minutes, and configure CloudWatch alarms to trigger a rollback.
  4. D
    Configure the Elastic Beanstalk deployment policy to Rolling. Set the batch size to 10%10\% and use an AWS Lambda function to monitor application log errors and trigger a rollback via the Elastic Beanstalk API.

Answer

Configure the Elastic Beanstalk deployment policy to Traffic Splitting. Set the split percentage to 10%10\% and the evaluation time to 1515 minutes.
The Traffic Splitting deployment policy in AWS Elastic Beanstalk is designed precisely for canary testing. It launches a new version of the application in a temporary Auto Scaling group, routes a designated percentage of incoming traffic (in this case, 10%10\%) to it for a specified evaluation period (1515 minutes), and monitors health. If the new version passes health checks, Elastic Beanstalk promotes it to the primary environment and terminates the old instances. If health checks fail or an alarm triggers, it immediately shifts traffic back to the old version and terminates the new instances, ensuring zero downtime and immediate rollback.

Step-by-Step Solution

1
Analyze the requirements for canary testing, traffic evaluation window (1515 minutes), and immediate automatic rollback.
Identify that the deployment must split traffic at the load balancer level (10%10\% to the new version, 90%90\% to the old) and automatically promote or roll back based on performance.
This determines the necessary features of the Elastic Beanstalk deployment policy.
2
Evaluate the native AWS Elastic Beanstalk deployment policies (All at once, Rolling, Rolling with additional batch, Immutable, Traffic splitting) against the requirements.
Only Traffic Splitting supports routing a portion of active traffic to a temporary Auto Scaling group while retaining the old instances, evaluating for a specified duration, and performing an automatic cleanup or rollback.
Choosing a native policy minimizes operational complexity and avoids custom scripting.

Key Concept

AWS Elastic Beanstalk Traffic Splitting deployment policy for canary testing
Rate this question