AWS Certified Developer – Associate (DVA-C02) — Question 506
A company has an Amazon DynamoDB table that contains records of users that have signed up for a trial of the company’s product. The company is using a spreadsheet to track data about the product trial. The company needs to ensure the spreadsheet is automatically updated with the latest information when individual trials begin, are updated, or finish.
Which solution will meet these requirements?
Answer options
- A. Create a DynamoDB Accelerator (DAX) cluster from the table. Set the view type to old image. Create an AWS Lambda function that uses the cluster data to update the spreadsheet. Subscribe the Lambda function to the cluster.
- B. Create a DynamoDB Accelerator (DAX) cluster from the table. Set the view type to new image. Create an AWS Lambda function that uses the cluster data to update the spreadsheet. Subscribe the Lambda function to the cluster.
- C. Enable a DynamoDB stream for the table. Set the view type to new image. Create an AWS Lambda function that uses the stream data to update the spreadsheet. Subscribe the Lambda function to the stream.
- D. Enable a DynamoDB stream for the table. Set the view type to old image. Create an AWS Lambda function that uses the stream data to update the spreadsheet. Subscribe the Lambda function to the stream.
Correct answer: C
Explanation
Enabling a DynamoDB stream allows the capturing of real-time item-level modifications, which can trigger an AWS Lambda function to update the spreadsheet. Setting the view type to 'new image' ensures that the stream records contain the entire item as it appears after the update, providing the latest trial status. Using DynamoDB Accelerator (DAX) is incorrect because DAX is an in-memory cache and does not natively stream events to Lambda.