An application uses a DynamoDB table containing millions of items and receives 30–60 requests per minute. The developer needs near-real-time processing whenever items are added or updated with the MINIMUM changes to existing application code. Which approach should the developer use?
Choose an answer
Tap an option to check your answer.
Correct answer: Enable a DynamoDB stream on the table and invoke an AWS Lambda function to process the records..
Why this is the answer
Enabling a DynamoDB stream and invoking an AWS Lambda function is the most efficient and least intrusive solution for near-real-time processing. DynamoDB streams capture item-level modifications (additions, updates, deletions) in near real-time, and Lambda functions can be automatically triggered by these stream events. This approach requires minimal changes to the existing application code, as the application continues to interact with DynamoDB as usual. Running a cron job on an EC2 instance to query the table every hour would not provide near-real-time processing and would be inefficient for detecting changes. Modifying the application to send PutEvents calls to Amazon EventBridge would require significant changes to the existing application code, as every write operation would need to be re-engineered to emit an event. Changing the application to perform processing synchronously immediately after writing to DynamoDB would increase the latency of write operations and couple the application tightly with the processing logic, which is generally not a best practice for scalable, decoupled architectures.
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