Soru

Zorluk: OrtaDeployment Strategy Design

An e-commerce company is migrating its order processing service to a containerized application running on Amazon ECS with AWS Fargate, fronted by an Application Load Balancer (ALB). The service is highly sensitive to downtime, and any deployment must ensure zero downtime. Additionally, the development team wants to test new releases under production load by routing 10%10\% of the traffic to the new version for a 1515-minute observation period. If the new version triggers any CloudWatch alarms for 5xx5\text{xx} errors or high latency during this period, the deployment must automatically roll back. Which deployment strategy should the Solutions Architect design to satisfy these requirements?

  1. Configure the Amazon ECS service to use the AWS CodeDeploy blue/green deployment controller. Create a CodeDeploy deployment group utilizing the CodeDeployDefault.ECSCanary10Percent15Minutes configuration, and specify the CloudWatch alarms for 5xx5\text{xx} errors and latency as rollback triggers in the deployment group.Cevap
  2. B
    Configure the Amazon ECS service to use the ECS rolling update deployment type. Enable the ECS deployment circuit breaker with rollback enabled, and set the minimum healthy percent to 100%100\% and maximum percent to 200%200\%.
  3. C
    Deploy a second Amazon ECS service with the new application version. Configure the Application Load Balancer with two path-based target groups. Use Amazon Route 53 weighted routing policies to route 10%10\% of the traffic to the new ECS service, and configure an AWS Lambda function to monitor CloudWatch alarms and update Route 53 weights to 0%0\% if alarms are triggered.
  4. D
    Configure the Amazon ECS service to use the ECS rolling update deployment type. Use an AWS Systems Manager Automation runbook to gradually register new Fargate tasks to the target group in 10%10\% increments every 1.51.5 minutes, and configure the target group to deregister tasks if the 5xx5\text{xx} metric alarm triggers.

Cevap

Configure the Amazon ECS service to use the AWS CodeDeploy blue/green deployment controller with the CodeDeployDefault.ECSCanary10Percent15Minutes configuration, and associate CloudWatch alarms with the deployment group for automated rollback.
The correct option is correct because AWS CodeDeploy blue/green deployment is the standard AWS solution for performing canary and linear deployments on Amazon ECS. It natively shifts a specified percentage of traffic (such as 10%10\%) to the new task set for a defined duration (such as 1515 minutes) using the Application Load Balancer's target groups. It also integrates directly with Amazon CloudWatch alarms to automatically trigger rollbacks if application-level errors or latency exceed thresholds during the deployment window.

Adım Adım Çözüm

1
Change the deployment controller of the Amazon ECS service to AWS CodeDeploy.
Amazon ECS delegates the deployment and traffic routing process to AWS CodeDeploy rather than using the default rolling update scheduler.
CodeDeploy is required to manage weighted traffic shifting (canary/linear) between two task sets (Blue and Green) on ECS.
2
Configure the deployment group in AWS CodeDeploy to use the predefined Canary configuration.
The deployment group is set to CodeDeployDefault.ECSCanary10Percent15Minutes, which directs 10%10\% of production traffic to the new Fargate tasks for 1515 minutes.
This matches the requirement to test new releases under a small portion of production load for a specific duration.
3
Attach CloudWatch alarms for 5xx5\text{xx} errors and latency to the CodeDeploy deployment group's rollback configuration.
If any of the specified alarms enter the ALARM state during the 1515-minute canary period, CodeDeploy immediately aborts the deployment and routes 100%100\% of traffic back to the original task set.
This fulfills the automated rollback requirement with zero downtime.

Anahtar Kavram

AWS CodeDeploy Blue/Green Deployment with Canary traffic shifting on ECS
Bu soruyu puanla