DOP-C02 Question 270
Select 3Your organization is using AWS CodePipeline to orchestrate a CI/CD process. The pipeline deploys an application to an Amazon ECS cluster using AWS CodeDeploy. During a deployment, a rollback was triggered because the application failed the health check. The team wants to investigate the root cause of the failure and also ensure faster feedback for future deployments. Which of the following actions should you take to address these requirements?
- A
Enable detailed monitoring in Amazon CloudWatch for the ECS cluster and review the metrics and logs.
- B
Use AWS CodeDeploy deployment lifecycle event hooks to log diagnostic information during deployment.
- C
Configure an Amazon EventBridge rule to trigger a Lambda function when a rollback occurs, sending notifications to the team.
- D
Activate AWS CloudTrail logging for AWS CodeDeploy to track deployment activity.
- E
Update the ECS service to use a higher number of minimum healthy instances during deployment.
Show answer and explanation
Correct answers: A, B, C
Explanation
To address the root cause of a deployment failure and ensure faster feedback, you should enable detailed monitoring in CloudWatch to analyze metrics and logs, use CodeDeploy lifecycle event hooks to collect diagnostic information during various stages of deployment, and configure EventBridge to send immediate notifications or trigger automated diagnostics upon a rollback. These actions work together to improve visibility and response time during deployment issues.
- A. Correct.
Enabling detailed monitoring in Amazon CloudWatch allows you to collect and analyze metrics and logs from the ECS cluster, which can help diagnose the root cause of the health check failure.
- B. Correct.
Using AWS CodeDeploy lifecycle event hooks (e.g., BeforeInstall, AfterInstall) enables you to log diagnostic information at different stages of the deployment process, helping to identify deployment-related issues.
- C. Correct.
Configuring an Amazon EventBridge rule to trigger a notification or diagnostic Lambda function during a rollback ensures the team gets immediate feedback and can analyze the issue promptly.
- D. Incorrect.
While AWS CloudTrail logs can provide an audit trail of API calls, it is not directly helpful in diagnosing why the health check failed during a deployment.
- E. Incorrect.
Updating the ECS service to use a higher number of minimum healthy instances may reduce deployment risk but does not directly address root cause analysis or faster feedback.