AWS Certified Developer – Associate — Question 133
How would a developer notify users when a new item is written to a DynamoDB table without affecting the provisioned throughput?
Answer options
- A. Set up a DynamoDB stream to trigger a Lambda function that sends an SNS notification to users.
- B. Schedule an Amazon CloudWatch event to regularly trigger a Lambda function that scans the DynamoDB table.
- C. Run a polling application that queries the DynamoDB table at one-second intervals and send SNS notification to users.
- D. Embed a Lambda notification function in DynamoDB and configure DynamoDB to trigger the embedded Lambda function when changes are made.
Correct answer: A
Explanation
The correct answer is A because using a DynamoDB stream allows changes to be processed without impacting the table's provisioned throughput. Option B is inefficient as it regularly scans the table, which can consume read capacity. Option C introduces excessive polling, which can lead to high costs and performance issues. Option D is not a supported configuration as DynamoDB does not allow embedding Lambda functions directly.