DVA-C02 · Question #227
A company uses Amazon DynamoDB as a data store for its order management system. The company frontend application stores orders in a DynamoDB table. The DynamoDB table is configured to send change even
The correct answer is D. Turn on custom Amazon CloudWatch metrics for the DynamoDB stream of the DynamoDB table.. Custom CloudWatch metrics published by the Lambda function is the right approach because Lambda already processes every order from the DynamoDB stream, giving it direct access to the order data. When the function detects quantity = 0, it can emit a custom metric (e.g., incrementi
Question
A company uses Amazon DynamoDB as a data store for its order management system. The company frontend application stores orders in a DynamoDB table. The DynamoDB table is configured to send change events to a DynamoDB stream. The company uses an AWS Lambda function to log and process the incoming orders based on data from the DynamoDB stream. An operational review reveals that the order quantity of incoming orders is sometimes set to 0. A developer needs to create a dashboard that will show how many unique customers this problem affects each day. What should the developer do to implement the dashboard?
Options
- AGrant the Lambda function's execution role permissions to upload logs to Amazon CloudWatch
- BUse Amazon Athena to query AWS CloudTrail API logs for API calls. Implement an Athena query
- CConfigure the Lambda function to send events to Amazon EventBridge. Create an EventBridge
- DTurn on custom Amazon CloudWatch metrics for the DynamoDB stream of the DynamoDB table.
How the community answered
(35 responses)- A9% (3)
- B3% (1)
- C17% (6)
- D71% (25)
Explanation
Custom CloudWatch metrics published by the Lambda function is the right approach because Lambda already processes every order from the DynamoDB stream, giving it direct access to the order data. When the function detects quantity = 0, it can emit a custom metric (e.g., incrementing a counter keyed by customer ID), and CloudWatch can then aggregate these into a daily dashboard widget showing unique affected customers.
Why the distractors fail:
- A - CloudWatch log permissions alone don't produce a queryable metric dashboard; raw logs require additional tooling (like CloudWatch Logs Insights) and don't natively aggregate unique customers per day.
- B - CloudTrail records AWS API calls (e.g.,
PutItem,UpdateItem), not the actual data values inside those calls, so you cannot extractquantity = 0from CloudTrail logs. - C - EventBridge is an event bus for routing events between services; it doesn't inherently create dashboards or aggregate metrics without additional downstream infrastructure.
Memory tip: Whenever an exam question involves detecting a specific data condition inside a Lambda-processed stream and visualizing it over time, think Lambda → Custom CloudWatch Metric → Dashboard. Custom metrics are the bridge between your business logic and CloudWatch's visualization layer.
Topics
Community Discussion
No community discussion yet for this question.