AWS Certified DevOps Engineer – Professional (DOP-C02) — Question 354
A company hosts several applications in an AWS account. Each application sends logs to its own log group in Amazon CloudWatch. The company's CloudWatch costs for ingestion are increasing.
A DevOps engineer needs to identify which applications are the source of the increased logging costs.
Which solution will meet this requirement in the MOST operationally efficient way?
Answer options
- A. Use CloudWatch metrics to create a custom expression that identifies the CloudWatch log groups that receive the most data.
- B. Use Amazon CloudWatch Logs Insights to create a query for the application log groups to identify the number of log groups that received data during a specific time period.
- C. Use AWS Cost Explorer to generate a cost report that details costs for CloudWatch usage.
- D. Use AWS CloudTrail to filter for CreateLogStream events for each application.
Correct answer: A
Explanation
Using CloudWatch metrics with math expressions (such as sorting the IncomingBytes metric across log groups) allows the engineer to quickly and cost-effectively find the high-volume log groups. AWS Cost Explorer only provides high-level billing data and cannot drill down to individual log group ingestion volumes. CloudWatch Logs Insights queries and CloudTrail event filtering would either incur additional analysis costs or fail to provide the exact data ingestion volume per log group.