Q93 — AWS DVA-C02 Ch.3

Question 93 of 100 | ← Chapter 3

A developer designed an application that stores input data as JSON files in Amazon S3 objects. Subsequently, a custom business logic in an AWS Lambda function processes these objects, and the Lambda function loads the data into an Amazon DynamoDB table. Recently, the workload’s traffic experienced sudden and significant fluctuations. The data stream into the DynamoDB table is being throttled. The developer needs to implement a solution to eliminate throttling and load data more consistently into the DynamoDB table. Which solution meets these requirements?

Correct Answer: D. Refactor the Lambda function into two functions: one to store data in the DynamoDB table and another to process and update items after storage. Enable a DynamoDB Stream to invoke the second function after data is stored.

Explanation

Option D is correct. Refactoring into two functions separates concerns: the first writes data directly to DynamoDB, and the second performs post-processing asynchronously via DynamoDB Streams. DynamoDB Streams capture item-level modifications (e.g., inserts) and natively trigger Lambda functions, enabling reliable, ordered, and scalable asynchronous processing without additional infrastructure or complexity. Option A introduces unnecessary coupling and latency via SQS; option B addresses capacity but not inconsistent ingestion patterns; option C improves Lambda concurrency but does not resolve DynamoDB throttling caused by bursty writes. Thus, D best eliminates throttling and ensures consistent, scalable data loading.