Batch smart meter readings through Kinesis Data Streams and raise DynamoDB write capacity
Short answer
AD Increase DynamoDB write capacity units and stream the data through Kinesis Data Streams for batch processing.
Question
Key Takeaways
The two exception types point at two separate ceilings, so both must be addressed: DynamoDB's provisioned write throughput is the first, and Lambda concurrency is the second, and streaming the data through Kinesis to be processed in batches attacks the second by cutting the number of invocations.
A utility collects usage data every five minutes from smart meters through API Gateway and Lambda into a DynamoDB table. In the pilot the functions took three to five seconds, but they now take one to two minutes and are getting slower as new metric types are added, with ProvisionedThroughputExceededException on DynamoDB PUTs and TooManyRequestsException from Lambda.
Common mistake: Increasing the Lambda memory size. More memory makes the function run faster per invocation, which helps duration, but the problem is too many concurrent invocations of a fixed duration rather than each one being too slow, so raising memory reduces TooManyRequestsException only marginally and does nothing at all for the DynamoDB write throughput errors.
Expert Analysis
Why the Answer Is Correct
The two error types map to two distinct limits. The ProvisionedThroughputExceededException errors on the DynamoDB PUT operations mean the table's provisioned write capacity units cannot absorb the write rate, so increasing the write capacity units directly removes that ceiling, which is why A is correct. The TooManyRequestsException errors from Lambda mean the function is being invoked faster than the configured concurrency allows, and streaming the data into an Amazon Kinesis data stream from API Gateway lets the processing happen in batches instead of one invocation per message, which cuts the invocation count and the per-invocation overhead that is driving duration up. That is why D is correct. Because batching also reduces the number of individual writes, the two changes reinforce each other.
Why the Other Options Are Wrong
B: Raising the function's memory reduces the duration of each invocation, but the function is already taking one to two minutes, so it is concurrency-bound rather than CPU-bound, and more memory does not change the number of invocations required per meter reading. It also does nothing for the DynamoDB throughput errors. C: Increasing the payload size from the meters makes each invocation process more data and write more items, which worsens both the Lambda concurrency pressure and the DynamoDB write throughput pressure, so it moves the metrics in exactly the wrong direction. E: An SQS FIFO queue adds a polling model and ordered message semantics that are not required here, and it still processes one message per invocation, so it does not reduce the invocation count the way batching through Kinesis does.
Community Comment Notes
The community voted 100 to 0 for A and D, and the top-voted comment explained that increasing the write capacity units and processing data in batches through Kinesis addresses the throughput limitation, reduces Lambda invocation overhead, and lowers the load on both services. A dissenting comment argued for increasing Lambda memory, but the consensus view was that Kinesis batching is what reduces the invocation count rather than making each individual invocation faster.
Official Reference
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Update.html
This link opens the official vendor documentation in a new tab.
Community Votes
100% of anonymous learners picked answer AD. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 6 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 6
-
mifune 👍 6I would go with Increasing the write capacity units to the DynamoDB table and Stream the data into an Amazon Kinesis data stream from API Gateway and process the data in batches. I think that processing the data in batches is much better than increasing the lambda functions memory.
-
zapper1234 👍 5AB because the more memory a Lambda funtion has the faster it reacts
-
vip2 👍 4Kinesis allows to process data in batches, which can help reduce the number of requests and the load on your Lambda functions and DynamoDB.
-
ujizane 👍 2need batch execution so i think AD is correct
-
0b43291 👍 1By increasing the DynamoDB write capacity units and streaming the data into a Kinesis data stream for batch processing, you can address the throughput limitations, reduce Lambda invocation overhead, and improve the overall performance and scalability of the smart meter data processing pipeline. The other options are either not applicable or may not resolve the issues effectively: B. Increasing the memory available to the Lambda functions may not resolve the issues caused by the high volume of concurrent requests and the need for batching. C. Increasing the payload size from the smart meters is not necessary and may even exacerbate the issues by increasing the processing overhead for each data point. E. Collecting data in an Amazon SQS FIFO queue and triggering a Lambda function for each message would still result in a high number of Lambda invocations and may not provide significant performance improvements compared to processing data in batches from a Kinesis data stream.
Show 1 more comment
-
wbedair 👍 3A and D
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All SAP-C02 Questions
Access 85 questions with complete answers and detailed explanations.
View Full SAP-C02 Practice Test →