A SysOps Administrator is configuring a blue/green deployment strategy for a containerized application running on Amazon Elastic Container Service (Amazon ECS) behind an Application Load Balancer (ALB). The updates must be deployed using AWS CodeDeploy. The administrator needs to ensure that the deployment automatically rolls back if the new tasks fail to launch or fail target group health checks, or if application performance degradation (such as elevated error rates) occurs during traffic shifting. Which two configuration steps must the administrator perform to meet these requirements? (Choose two.)
- Update the ECS service definition to set the deployment controller type to CodeDeploy, and associate the deployment group with two target groups: one for the active traffic environment and one for the standby environment.Answer
- Create Amazon CloudWatch alarms that monitor application metrics, and add these alarms to the CodeDeploy deployment group's automatic rollback configuration.Answer
- CEnable the ECS deployment circuit breaker with the rollback option enabled within the ECS service definition.
- DConfigure an Amazon EventBridge rule that detects a CodeDeploy deployment failure event and triggers an AWS Systems Manager (SSM) Automation workflow to redeploy the previous task definition.
- EAttach an IAM policy to the CodeDeploy service role that permits the sts:AssumeRole action but excludes the iam:PassRole permission for the ECS task execution role.
Answer
To configure the blue/green deployment for Amazon ECS using AWS CodeDeploy with automatic rollback capabilities, the administrator must configure the ECS service deployment controller type to CodeDeploy, associate the deployment group with blue and green target groups, and configure Amazon CloudWatch alarms to trigger automatic rollbacks in the CodeDeploy deployment group.
The correct options specify configuring the ECS service to use the CodeDeploy deployment controller with two target groups (blue and green) to enable the blue/green deployment pattern, and configuring CloudWatch alarms in the CodeDeploy deployment group's automatic rollback settings to monitor metrics during deployment and trigger a rollback if needed.
Step-by-Step Solution
Key Concept
AWS CodeDeploy manages ECS blue/green deployments by shifting traffic between two target groups and can automate rollbacks using native CloudWatch alarm integration.