AWS Certified Developer – Associate — Question 195
A developer is working on a serverless application that needs to process any changes to an Amazon DynamoDB table with an AWS Lambda function.
How should the developer configure the Lambda function to detect changes to the DynamoDB table?
Answer options
- A. Create an Amazon Kinesis data stream, and attach it to the DynamoDB table. Create a trigger to connect the data stream to the Lambda function.
- B. Create an Amazon EventBridge (Amazon CloudWatch Events) rule to invoke the Lambda function on a regular schedule. Connect to the DynamoDB table from the Lambda function to detect changes.
- C. Enable DynamoDB Streams on the table. Create a trigger to connect the DynamoDB stream to the Lambda function.
- D. Create an Amazon Kinesis Data Firehose delivery stream, and attach it to the DynamoDB table. Configure the delivery stream destination as the Lambda function.
Correct answer: C
Explanation
The correct answer is C because enabling DynamoDB Streams allows the Lambda function to automatically receive updates when changes occur in the DynamoDB table. Option A is incorrect as Kinesis data streams are not necessary for this use case, and option B does not provide real-time updates but rather polls the table. Option D is also incorrect since Kinesis Data Firehose is not designed for triggering Lambda functions based on DynamoDB changes.