Soru

Zorluk: OrtaDeployment Strategy Design

An organization is deploying a new version of a microservice hosted on Amazon ECS Fargate using AWS CloudFormation. The deployment strategy must shift 10% of the traffic to the new version initially, and monitor the application for 15 minutes. If any CloudWatch alarms are triggered during this period, the deployment must automatically roll back. Otherwise, the remaining 90% of the traffic must be shifted to the new version. Which of the following configurations should the Solutions Architect implement in the CloudFormation template to meet these requirements?

  1. Configure the ECS service deployment controller to CODE_DEPLOY, and configure the AWS::CodeDeploy::BlueGreen hook in the CloudFormation template with the CodeDeployDefault.ECSCanary10Percent15Minutes deployment configuration and target CloudWatch alarms.Cevap
  2. B
    Configure the ECS service deployment controller to ECS (rolling update), set the minimumHealthyPercent parameter to 90%, and specify CloudFormation RollbackTriggers to monitor the CloudWatch alarms.
  3. C
    Configure the ECS service deployment controller to CODE_DEPLOY, and configure the AWS::CodeDeploy::BlueGreen hook in the CloudFormation template with the CodeDeployDefault.ECSLinear10PercentEvery15Minutes deployment configuration and target CloudWatch alarms.
  4. D
    Configure the ECS service deployment controller to EXTERNAL, and deploy an AWS Lambda function within CloudFormation that updates the Application Load Balancer listener rule weights from 10% to 100% after a 15-minute wait.

Cevap

Configure the ECS service deployment controller to CODE_DEPLOY, and configure the AWS::CodeDeploy::BlueGreen hook in the CloudFormation template with the CodeDeployDefault.ECSCanary10Percent15Minutes deployment configuration and target CloudWatch alarms.
The correct configuration uses the CODE_DEPLOY deployment controller for the ECS service along with the AWS::CodeDeploy::BlueGreen hook in CloudFormation. By selecting the CodeDeployDefault.ECSCanary10Percent15Minutes configuration, CodeDeploy shifts 10% of the traffic to the new task set, waits for 15 minutes while monitoring the specified CloudWatch alarms, and automatically rolls back if any alarm is triggered. If no alarms trigger, it routes the remaining 90% of traffic to complete the deployment.

Adım Adım Çözüm

1
Set the deployment controller for the ECS service to CODE_DEPLOY in the CloudFormation template.
This delegates traffic shifting and deployment lifecycle management to AWS CodeDeploy.
Required for performing blue/green and canary deployments on ECS Fargate via CloudFormation.
2
Configure the AWS::CodeDeploy::BlueGreen hook under the Transform section of the CloudFormation template.
This tells CloudFormation to generate a CodeDeploy deployment during the stack update.
Allows CloudFormation to coordinate with CodeDeploy for the deployment process.
3
Specify the CodeDeployDefault.ECSCanary10Percent15Minutes deployment configuration in the hook properties, and associate the target CloudWatch alarms.
CodeDeploy will route 10% of traffic to the green task set, monitor the specified CloudWatch alarms for 15 minutes, and if no alarms fire, shift the remaining 90% of traffic to the green task set.
Meets the requirement of a 10% initial canary shift with a 15-minute bake period and automatic rollback on alarm triggers.

Anahtar Kavram

AWS CloudFormation integrates with AWS CodeDeploy using the AWS::CodeDeploy::BlueGreen hook to manage canary and linear traffic-shifting deployments for ECS Fargate services, enabling automatic rollback based on CloudWatch alarms.
Bu soruyu puanla