DOP-C02 · Question #451
A company is using AWS CodeDeploy to deploy applications to a fleet of Amazon EC2 instances. During a recent deployment, several EC2 instances failed to update successfully. A DevOps engineer must inv
The correct answer is D. Send CodeDeploy agent logs to Amazon CloudWatch Logs by using the CloudWatch agent.. AWS recommends centralizing CodeDeploy agent logs in Amazon CloudWatch Logs for efficient analysis. By configuring the CloudWatch agent or using the CodeDeploy console integration, you can stream logs in near-real time and query them with CloudWatch Logs Insights. This enables fi
Question
A company is using AWS CodeDeploy to deploy applications to a fleet of Amazon EC2 instances. During a recent deployment, several EC2 instances failed to update successfully. A DevOps engineer must investigate the root cause of the failures and must determine which specific deployment lifecycle events encountered errors. What is the MOST operationally efficient way to access and analyze the detailed deployment logs for troubleshooting?
Options
- AUse SSH to connect to each EC2 instance that failed to update successfully. Read the logs from
- BUse AWS Systems Manager Session Manager to connect to each EC2 instance that failed to
- CCreate an Amazon S3 bucket to store CodeDeploy logs. Update the appspec.yml file to copy logs
- DSend CodeDeploy agent logs to Amazon CloudWatch Logs by using the CloudWatch agent.
How the community answered
(45 responses)- A16% (7)
- B4% (2)
- C7% (3)
- D73% (33)
Explanation
AWS recommends centralizing CodeDeploy agent logs in Amazon CloudWatch Logs for efficient analysis. By configuring the CloudWatch agent or using the CodeDeploy console integration, you can stream logs in near-real time and query them with CloudWatch Logs Insights. This enables filtering by deployment lifecycle events, saving time versus manually connecting to instances.
Topics
Community Discussion
No community discussion yet for this question.