Q9 — AWS DVA-C02 Ch.3

Question 9 of 100 | ← Chapter 3

A developer is required to create an AWS Lambda function that is invoked when items in an Amazon DynamoDB table are updated. The function has been created, and appropriate permissions have been added to the Lambda execution role. DynamoDB Streams have been enabled on the table, but the function is still not being invoked. Which option will cause DynamoDB table updates to invoke the Lambda function?

Correct Answer: B. Configure an event source mapping for the Lambda function.

Explanation

Option B recommends configuring an event source mapping for the Lambda function, designating the DynamoDB stream as the trigger. This ensures the Lambda function is invoked when items in the DynamoDB table are updated. Issues with other options: Option A’s change to StreamViewType affects the content of stream records but does not directly enable Lambda invocation. Option C’s mapping of an Amazon SNS topic to the DynamoDB stream is unrelated to triggering Lambda functions. Option D’s increase in timeout does not address the root cause of the Lambda function not being invoked.