An AWS Lambda function should be triggered whenever items in an Amazon DynamoDB table are updated. The function and its execution role are configured, and DynamoDB Streams are enabled for the table, but the Lambda function is still not being invoked. What action will connect DynamoDB table updates to the Lambda function invocations?
Choose an answer
Tap an option to check your answer.
Correct answer: Create an event source mapping for the Lambda function to the DynamoDB stream..
Why this is the answer
The correct action is to create an event source mapping for the Lambda function to the DynamoDB stream. An event source mapping is the mechanism that connects an AWS service, like DynamoDB Streams, to a Lambda function, telling Lambda to poll the stream and invoke the function with new records. Without this mapping, even if the stream is enabled and the function exists, Lambda won't know to process the stream's events. Changing the StreamViewType to NEWANDOLDIMAGES is important for capturing the desired data in the stream but doesn't, by itself, connect the stream to the Lambda function. Subscribing an Amazon SNS topic to the DynamoDB stream is not a direct way to trigger a Lambda function from a DynamoDB stream; SNS is typically used for fan-out messaging, not directly for stream processing. Increasing the Lambda function's timeout is irrelevant to the problem of the function not being invoked at all.
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