A company runs a critical microservice on Amazon ECS using the AWS Fargate launch type behind an Application Load Balancer (ALB). A SysOps administrator is configuring a Blue/Green deployment using AWS CodeDeploy. The deployment must satisfy the following conditions:
- The new task definition version must be deployed and validated using a dedicated test listener port before routing production traffic.
- Production traffic must be shifted to the new version gradually over 10 minutes, with 10% shifted every minute.
- CodeDeploy must have the authority to update the ECS service and run tasks with the required task execution role.
Which combination of actions must the SysOps administrator take to meet these requirements? (Select TWO.)
- Configure the CodeDeploy deployment group to use the CodeDeployDefault.ECSLinear10PercentEvery1Minute traffic shifting configuration, and specify a test listener port on the Application Load Balancer.Answer
- Attach a policy to the CodeDeploy service role that grants the iam:PassRole permission for the ECS task execution role and task role.Answer
- CConfigure the ECS service to use the ECS rolling update deployment controller type, setting the minimum healthy percent to 100% and maximum percent to 200%.
- DUpdate the Amazon Route 53 alias record pointing to the Application Load Balancer to use a weighted routing policy that shifts traffic gradually over 10 minutes.
- EAdd the sts:AssumeRole permission for the ECS task execution role to the trust relationship policy document of the CodeDeploy service role.
Answer
To satisfy the deployment requirements, the administrator must configure the CodeDeploy deployment group with the CodeDeployDefault.ECSLinear10PercentEvery1Minute traffic shifting option and specify a test listener port on the Application Load Balancer. Additionally, the administrator must attach a policy to the CodeDeploy service role that grants the iam:PassRole permission for the ECS task execution role and task role.
To perform an ECS Blue/Green deployment using CodeDeploy, a deployment group must define the traffic shifting style (such as CodeDeployDefault.ECSLinear10PercentEvery1Minute) and target group configuration. To validate the replacement tasks before routing production traffic, a test listener port is configured. Furthermore, CodeDeploy needs authorization to pass the ECS task execution role and task role to the Amazon ECS service during task creation, which requires the iam:PassRole permission in the CodeDeploy service role's permissions policy.
Step-by-Step Solution
Key Concept
ECS Blue/Green Deployments with AWS CodeDeploy and Identity and Access Management (IAM) permissions