An application stores incoming JSON files in S3, then a Lambda transforms them and writes items to DynamoDB. Sudden traffic spikes cause DynamoDB throttling. Which change will remove throttling and smooth writes into DynamoDB?
Choose an answer
Tap an option to check your answer.
Correct answer: Split the Lambda into two functions: one to transform and one to write to DynamoDB. Put an SQS queue between them so messages buffer and invoke the writer function..
Why this is the answer
The correct solution uses an SQS queue as a buffer between the transformation and writing steps. When traffic spikes, SQS can absorb the excess messages, preventing the DynamoDB writer Lambda from being overwhelmed. The writer Lambda can then process messages from the queue at a controlled rate that DynamoDB can handle, effectively smoothing out the writes and preventing throttling. Enabling DynamoDB auto scaling is a good practice, but it reacts to throttling after it occurs and might not prevent initial spikes if scaling takes time. Creating a Lambda alias with provisioned concurrency helps with Lambda cold starts and execution duration but doesn't address DynamoDB throttling directly. Splitting the Lambda into two and using a DynamoDB stream for post-write processing doesn't solve the initial write throttling issue; it processes items after they've been successfully written.
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