Question

Difficulty: MediumDeployment Strategies

A developer is designing a deployment pipeline for a critical microservice on AWS. The deployment process must ensure zero downtime, allow testing of the new application version with a small fraction of production traffic before shifting all traffic, and support automatic rollback if CloudWatch alarms detect errors.

Which two deployment strategies or configurations will satisfy these requirements?

  1. An AWS CodeDeploy Canary deployment for an AWS Lambda functionAnswer
  2. An AWS CodeDeploy Linear deployment for an Amazon ECS serviceAnswer
  3. C
    An AWS Elastic Beanstalk All-at-Once deployment
  4. D
    An Amazon ECS Rolling Update with a minimum healthy percent of 100% and a maximum percent of 200%
  5. E
    An AWS Elastic Beanstalk Rolling deployment

Answer

The deployment configurations that satisfy the requirements are the AWS CodeDeploy Canary deployment for an AWS Lambda function and the AWS CodeDeploy Linear deployment for an Amazon ECS service.
The correct strategies are the AWS CodeDeploy Canary deployment for an AWS Lambda function and the AWS CodeDeploy Linear deployment for an Amazon ECS service. Both configurations leverage traffic shifting (either at the Lambda alias level or via an Application Load Balancer target group for ECS) to route a small percentage of production traffic to the new version. Additionally, CodeDeploy monitors CloudWatch alarms during the deployment and can trigger an automatic, near-instantaneous rollback if errors are detected.

Step-by-Step Solution

1
Analyze the requirement for gradual traffic shifting to test the new version with a small fraction of production traffic.
Identify that AWS CodeDeploy Canary and Linear configurations support routing a small percentage of traffic (e.g., 10%) initially.
This isolates the test traffic and minimizes blast radius.
2
Evaluate the rollback requirements under failure conditions.
Identify that AWS CodeDeploy integrates with CloudWatch alarms to monitor the deployment and automatically roll back if errors occur.
This satisfies the automatic rollback requirement without manual intervention.
3
Verify if the remaining options satisfy the constraints.
Eliminate Elastic Beanstalk All-at-Once (downtime), ECS Rolling Update (no dedicated canary traffic shifting or automated alarm integration), and Elastic Beanstalk Rolling (no fine-grained traffic routing and automated rollback).
These strategies fail to meet either the zero-downtime, traffic-routing, or automatic rollback constraints.

Key Concept

Gradual traffic shifting and automated rollback using AWS CodeDeploy configurations for Lambda and ECS.
Estimated Time:2m 0s
Rate this question