Enable DynamoDB auto scaling to remove throttling under traffic growth
A company has a web application that uses Amazon API Gateway. AWS Lambda, and Amazon DynamoDB. A recent marketing campaign has increased demand. Monitoring software reports that many requests have significantly longer response times than before the marketing campaign. A solutions architect enabled Amazon CloudWatch Logs for API Gateway and noticed that errors are occurring on 20% of the requests. In CloudWatch, the Lambda function Throttles metric represents 1% of the requests and the Errors metric represents 10% of the requests. Application logs indicate that, when errors occur, there is a call to DynamoDB. What change should the solutions architect make to improve the current response times as the web application becomes more popular?
Community Votes
100% of anonymous learners picked answer B. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
The error signal points at DynamoDB rather than Lambda: Lambda error and throttle rates are far below the overall error rate, so the downstream table is being throttled, and DynamoDB auto scaling adjusts provisioned capacity so the table keeps up as traffic grows.
A web application uses API Gateway, Lambda, and DynamoDB, and a marketing campaign increased demand. Requests now take much longer, twenty percent of requests return errors, Lambda throttling is only one percent and Lambda errors are ten percent, and the application logs show a DynamoDB call whenever an error occurs.
Increasing the Lambda concurrency limit. Lambda throttling accounts for only one percent of requests, so raising the concurrency ceiling adds simultaneous executions that each retry the same throttled table call, which increases load without reducing errors.
Community Discussion (6 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
The metrics isolate the bottleneck. Twenty percent of requests error, but Lambda throttles are only one percent and Lambda errors are ten percent, so roughly half of all failures originate outside Lambda, and the application logs confirm that a DynamoDB call accompanies every error. That pattern is DynamoDB request throttling caused by provisioned read and write capacity no longer matching demand after the campaign. DynamoDB auto scaling adjusts the provisioned capacity of the table and its indexes as traffic changes, so the table absorbs the growth automatically and the errors and the associated latency stop, with no manual capacity planning as the application becomes more popular.Why the Other Options Are Wrong
A: Increasing the Lambda concurrency limit addresses only the one percent of requests being throttled at the function level, and since the throttled table call is the actual failure, the additional concurrent executions simply retry the same failing request and add more load. C: Raising the API Gateway throttle limit increases the number of requests forwarded into a system that is already failing, so it worsens the backlog and the latency instead of reducing them. D: Recreating the table with a better-partitioned primary index addresses hot-key distribution, but nothing in the scenario indicates key skew, and the traffic simply grew beyond the current capacity, which is an auto scaling problem rather than a schema problem.Community Comment Notes
The community voted 100 to 0 for B, and the consensus reasoning was that the error is tied to the DynamoDB call under a traffic spike, with a commenter linking the DynamoDB auto scaling documentation to confirm the mechanism.Official Reference
Related Analysis
Practice All SAP-C02 Questions
Access 85 questions with complete answers and detailed explanations.
View Full SAP-C02 Practice Test →