A company is deploying a new version of a microservice on Amazon ECS (Fargate) behind an Application Load Balancer (ALB). The deployment uses AWS CodeDeploy to perform a blue/green deployment. The ALB is configured with two target groups: one for production traffic on port 80, and one for test traffic on port 8080.
The deployment must satisfy the following requirements:
1. Route of production traffic to the replacement task set (Green) initially, and then route the remaining after a 15-minute wait period.
2. Run automated validation tests against the replacement task set using the test traffic port (8080) before any production traffic is shifted.
3. Automatically roll back the deployment if the validation tests fail or if a CloudWatch alarm monitoring 5XX errors triggers during the 15-minute wait period.
Which configuration should the developer specify in the CodeDeploy deployment configuration and the AppSpec file to meet these requirements?
- Use CodeDeployDefault.ECSCanary10Percent15Minutes as the deployment configuration. In the AppSpec file, specify the validation test Lambda function under the AfterAllowTestTraffic hook.Cevap
- BUse CodeDeployDefault.ECSCanary10Percent15Minutes as the deployment configuration. In the AppSpec file, specify the validation test Lambda function under the ValidateService hook.
- CUse CodeDeployDefault.ECSLinear10PercentEvery3Minutes as the deployment configuration. In the AppSpec file, specify the validation test Lambda function under the AfterAllowTestTraffic hook.
- DUse CodeDeployDefault.ECSCanary10Percent15Minutes as the deployment configuration. In the AppSpec file, specify the validation test Lambda function under the BeforeInstall hook.