A company stores sales data in a DynamoDB table with DynamoDB Streams enabled. Each item has a TransactionStatus attribute with values failed, pending, or completed. The company wants to be notified for failed sales where Price exceeds a threshold. What approach requires the least development effort to set up this notification?
Choose an answer
Tap an option to check your answer.
Correct answer: Create an event source mapping from DynamoDB Streams to a Lambda function and use Lambda event filtering so the function is invoked only for failed sales whose Price is above the threshold. Have the function publish to an Amazon SNS topic..
Why this is the answer
The correct option leverages Lambda event filtering, which allows you to specify criteria for invoking the Lambda function directly from the DynamoDB Stream. This significantly reduces the amount of code needed within the Lambda function itself, as the filtering logic is handled by the AWS service. The Lambda function then only needs to publish to SNS when invoked, making it the least development effort. The second option requires writing the filtering logic inside the Lambda function, which is more development effort than using built-in filtering. The third option is incorrect because DynamoDB Streams cannot directly publish to an SNS topic with complex event filtering; an intermediary like Lambda is required. The fourth option is incorrect because CloudWatch Alarms monitor metrics, not the content of DynamoDB Stream records, and cannot perform the necessary content-based filtering.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed