A Solutions Architect is designing the deployment strategy for a new web application hosted on Amazon ECS with AWS Fargate. The application is fronted by an Application Load Balancer (ALB). The deployment process must satisfy the following business requirements:
- Shift 10% of the traffic to the new version initially, and shift the remaining 90% after 10 minutes of successful monitoring.
- Automatically roll back the deployment immediately if the HTTP 5xx error rate on the ALB exceeds 1% during the evaluation period.
- Rollbacks must incur zero downtime and ensure that no lingering traffic is directed to the new version.
Which two configurations should the Solutions Architect specify to meet these requirements?
- Configure AWS CodeDeploy with a deployment group that specifies the CodeDeployDefault.ECSCanary10Percent10Minutes deployment configuration.Cevap
- Create an Amazon CloudWatch alarm for the Application Load Balancer HTTPCode_Target_5XX_Count metric, and add this alarm to the rollback configuration of the CodeDeploy deployment group.Cevap
- CConfigure the Amazon ECS service to use the rolling update deployment controller and set the DeploymentCircuitBreaker to roll back the stack on failure.
- DSet up Amazon Route 53 weighted routing policies targeting two separate ECS services, and run an AWS Lambda function to update the routing weights and handle rollbacks.
- EConfigure a linear traffic shifting policy in AWS App Mesh using Virtual Router routes, and configure a custom AWS Lambda function to update the weights and rollback if 5xx errors occur.
Cevap
The correct configurations are to configure AWS CodeDeploy with a deployment group that specifies the CodeDeployDefault.ECSCanary10Percent10Minutes deployment configuration, and to create an Amazon CloudWatch alarm for the Application Load Balancer HTTPCode_Target_5XX_Count metric, adding this alarm to the rollback configuration of the CodeDeploy deployment group.
The correct answer combines AWS CodeDeploy's native canary deployment capability for Amazon ECS with Application Load Balancer monitoring. AWS CodeDeploy provides the built-in CodeDeployDefault.ECSCanary10Percent10Minutes deployment configuration, which shifts 10% of the traffic to the replacement task set (the new version), waits 10 minutes, and then shifts the remaining 90%. To automate the rollback based on HTTP 5xx errors, a CloudWatch alarm must be configured for the Application Load Balancer's HTTPCode_Target_5XX_Count metric and defined as a rollback trigger in the CodeDeploy deployment group. If the alarm transitions to the ALARM state during the deployment, CodeDeploy immediately and automatically reroutes 100% of the traffic back to the original task set, achieving zero downtime.
Adım Adım Çözüm
Anahtar Kavram
Deployment Strategy Design using AWS CodeDeploy for Amazon ECS