A developer is configuring a blue/green deployment for an application on Amazon ECS using AWS CodeDeploy. The deployment must execute a validation test suite to verify the application's health using a test traffic port before the production traffic is routed to the new task set. Additionally, CodeDeploy must be configured with the necessary permissions to manage the ECS deployment. Which of the following configurations must the developer perform? (Select TWO.)
- Define a validation Lambda function under the AfterAllowTestTraffic hook in the AppSpec file.Answer
- Configure the trust policy of the CodeDeploy service role to allow the codedeploy.amazonaws.com service principal to perform the sts:AssumeRole action.Answer
- CDefine a validation script under the ValidateService hook in the AppSpec file.
- DConfigure the trust policy of the ECS task execution role to allow the ecs.amazonaws.com service principal to assume the CodeDeploy service role.
- EStore the database credentials in Systems Manager Parameter Store as a String parameter type to enable automatic credentials rotation.
Answer
Define a validation Lambda function under the AfterAllowTestTraffic hook in the AppSpec file, and configure the trust policy of the CodeDeploy service role to allow the codedeploy.amazonaws.com service principal to perform the sts:AssumeRole action.
The correct options involve configuring the AfterAllowTestTraffic lifecycle hook in the AppSpec file to invoke a validation Lambda function on the test port, and setting up the CodeDeploy service role's trust policy to allow the codedeploy.amazonaws.com service principal to assume it.
Step-by-Step Solution
Key Concept
AWS CodeDeploy ECS Deployment Configuration