Why Lambda Execution Time Spikes: DynamoDB Throttling and How to Fix
A developer monitors an AWS Lambda function that processes messages from an Amazon SQS queue. CloudWatch logs show that the function's execution time has increased significantly over the past week. The function's code has not been changed recently. The function makes calls to an Amazon DynamoDB table. CloudWatch metrics show a high rate of DynamoDBProvisionedThroughputExceededException errors. The DynamoDB table has 5 read and 5 write capacity units (RCU/WCU). What is the most effective action to reduce the function's execution time?
Quick Answer
The answer is to increase the DynamoDB table’s read and write capacity units. This is correct because the Lambda function is being throttled by DynamoDB, as evidenced by the high rate of ProvisionedThroughputExceededException errors, which forces the function to retry operations and drastically increases execution time. On the AWS Certified Developer Associate DVA-C02 exam, this scenario tests your understanding of how DynamoDB throttling directly impacts Lambda performance and how to resolve it by scaling capacity, a common trap being that candidates might mistakenly try to optimize the Lambda code or SQS configuration instead. The search intent for Lambda DynamoDB throttling increase capacity is key here: when you see execution time spikes alongside throughput exceptions, always look to the database’s provisioned capacity first. Memory tip: “Throttle means throttle up the RCU/WCU”—if DynamoDB is throwing exceptions, your capacity is the bottleneck, not your code.
⚠ Common exam trap
Candidates often confuse performance issues caused by Lambda resource limits (memory, concurrency, timeout) with downstream service throttling, leading them to adjust Lambda settings instead of addressing the root cause in DynamoDB capacity.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Increase the DynamoDB table's read and write capacity units.
The high rate of DynamoDBProvisionedThroughputExceededException errors indicates that the Lambda function is being throttled by DynamoDB due to insufficient read and write capacity units. This throttling causes the function to retry operations, significantly increasing execution time. Increasing the RCU/WCU from 5 to a higher value directly addresses the bottleneck, allowing operations to complete without retries and reducing overall execution time.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Increase the Lambda function's memory allocation.
Why it's wrong here
Increasing memory may provide more CPU, but it does not solve the DynamoDB throttling issue. The function is still likely to be throttled when calling the table, leading to retries and increased execution time.
- ✗
Increase the Lambda function's reserved concurrency.
Why it's wrong here
More concurrent invocations would only increase the number of requests to DynamoDB, potentially worsening throttling. It does not reduce execution time for each invocation.
- ✓
Increase the DynamoDB table's read and write capacity units.
Why this is correct
Raising the provisioned capacity reduces the frequency of throttling exceptions. With fewer throttles, the function's retries decrease, leading to faster execution and lower overall latency.
- ✗
Increase the Lambda function's timeout.
Why it's wrong here
Increasing the timeout only allows the function to run longer, but it does not address the cause of increased execution time (DynamoDB throttling). The function may still time out if throttling persists.
Quick reference
Cloud Service Model Comparison
| Model | You Manage | Provider Manages | Examples |
|---|---|---|---|
| IaaS | OS, runtime, apps, data | Hardware, hypervisor, networking | EC2, Azure VMs, GCP Compute Engine |
| PaaS | Apps and data | OS, runtime, middleware, hardware | Elastic Beanstalk, Azure App Service |
| SaaS | Data and settings only | Everything else | Microsoft 365, Salesforce, Workday |
| FaaS / Serverless | Function code only | Infra, scaling, runtime | Lambda, Azure Functions, Cloud Run |
| CaaS | Containers and apps | Kubernetes, OS, hardware | EKS, AKS, GKE |
Go deeper
Related to this question
About these practice questions
This DVA-C02 question is part of Courseiva's 724-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
Same concept, more angles
1 more way this is tested on DVA-C02
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. A developer monitors an AWS Lambda function that processes messages from an Amazon SQS queue. CloudWatch logs show that the function's execution time has increased significantly over the past week, and it now frequently times out at the 5-minute timeout. The function's code has not been changed recently. The function makes calls to an Amazon DynamoDB table. What is the most likely cause of the increased execution time?
medium- ✓ A.The DynamoDB table's read capacity units are underprovisioned, causing throttling.
- B.The SQS queue's visibility timeout is too short, causing duplicate processing.
- C.The Lambda function's memory is too low, causing CPU throttling.
- D.The DynamoDB table's indexes are missing, causing full table scans.
Why A: The most likely cause is that the DynamoDB table's read capacity units are underprovisioned, leading to throttling (ProvisionedThroughputExceededException). When DynamoDB throttles requests, the Lambda function must retry them, which adds latency and can cause the function to exceed its 5-minute timeout. Since the code hasn't changed, this points to a scaling or capacity issue on the DynamoDB side.
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This DVA-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DVA-C02 exam.