DOP-C02 Question 143
Select 3Your company is using AWS CodePipeline to manage a CI/CD workflow for deploying an application to Amazon ECS. A recent audit revealed that the deployment process lacks sufficient logging and traceability, making it difficult to investigate failed deployments. As the DevOps engineer, you are tasked with improving observability and troubleshooting capabilities in the pipeline. What should you do to address these requirements?
- A
Enable AWS CloudTrail for CodePipeline to capture API calls and log event history.
- B
Integrate AWS CodeBuild into the pipeline and configure it to send build logs to Amazon CloudWatch Logs.
- C
Configure CodePipeline to store deployment artifacts in Amazon S3 with versioning enabled.
- D
Add an AWS Lambda function to the failure stage of CodePipeline to send error details to an Amazon SNS topic.
- E
Enable enhanced monitoring for ECS tasks to capture application-level logs and metrics.
Show answer and explanation
Correct answers: A, B, D
Explanation
To enhance observability and troubleshooting in an AWS CodePipeline-based CI/CD workflow, you need to focus on capturing logs, tracing API calls, and setting up mechanisms to notify or log failure details. Enabling CloudTrail ensures API call traceability, while CodeBuild integration with CloudWatch Logs allows access to build logs. Adding a Lambda function for failure notifications provides immediate insights into pipeline issues. These measures collectively address the audit's concerns about logging and traceability.
- A. Correct.
Enabling AWS CloudTrail will log all API calls made by CodePipeline, providing traceability and audit logs for pipeline actions. This is essential for troubleshooting and compliance purposes.
- B. Correct.
Integrating CodeBuild and sending logs to Amazon CloudWatch Logs makes build logs accessible for debugging failed builds or deployments. This improves observability during the pipeline execution.
- C. Incorrect.
While storing deployment artifacts in Amazon S3 with versioning enabled is a good practice for artifact management, it does not directly improve observability or troubleshooting capabilities.
- D. Correct.
Adding an AWS Lambda function to the failure stage of CodePipeline allows you to send detailed failure information to an Amazon SNS topic, enabling alerts and facilitating immediate investigation.
- E. Incorrect.
Enabling enhanced monitoring for ECS tasks provides application-level metrics and logs, but this is unrelated to improving observability within the pipeline itself.