Q25 — AWS DOP-C02 Ch.2
Question 25 of 100 | ← Chapter 2
A company sells products through an e-commerce web application. The company wants a dashboard displaying a pie chart of product transaction details. The company wants to integrate this dashboard with its existing Amazon CloudWatch dashboards.
- A. Update the e-commerce application to emit a JSON object to a CloudWatch Logs log group for each processed transaction. Use CloudWatch Logs Insights to query the log group and display results in pie chart format. Attach the results to the desired CloudWatch dashboard. ✓
- B. Update the e-commerce application to emit a JSON object to an Amazon S3 bucket for each processed transaction. Use Amazon Athena to query the S3 bucket and display results in pie chart format. Export results from Athena and attach them to the desired CloudWatch dashboard.
- C. Update the e-commerce application to be instrumented with AWS X-Ray. Create a new X-Ray segment. Add annotations for each processed transaction. Use X-Ray traces to query the data and display results in pie chart format. Attach the results to the desired CloudWatch dashboard.
- D. Update the e-commerce application to emit a JSON object to a CloudWatch Logs log group for each processed transaction. Create an AWS Lambda function to aggregate and write results to Amazon DynamoDB. Create a Lambda subscription filter for the log group. Attach the results to the desired CloudWatch dashboard.
Correct Answer: A. Update the e-commerce application to emit a JSON object to a CloudWatch Logs log group for each processed transaction. Use CloudWatch Logs Insights to query the log group and display results in pie chart format. Attach the results to the desired CloudWatch dashboard.
Explanation
Among AWS service integrations, CloudWatch Logs Insights directly analyzes log data and generates visualizations—including pie charts—without requiring additional services or data movement. Option A emits transaction data as JSON to a CloudWatch Logs log group and leverages Logs Insights for querying and visualization, enabling direct attachment to CloudWatch dashboards. Option B introduces S3 and Athena, adding unnecessary processing steps. Option C uses X-Ray, designed for distributed tracing—not business metric analysis. Option D adds architectural complexity with Lambda and DynamoDB. Therefore, Option A is the most operationally efficient. Per AWS CloudWatch Logs Insights documentation.