AWS Certified Solutions Architect – Professional (SAP-C02) — Question 415
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?
Answer options
- A. Increase the concurrency limit of the Lambda function.
- B. Implement DynamoDB auto scaling on the table.
- C. Increase the API Gateway throttle limit.
- D. Re-create the DynamoDB table with a better-partitioned primary index.
Correct answer: B
Explanation
The CloudWatch metrics indicate that Lambda throttling is minimal (1%), but Lambda errors (10%) are high and correlate directly with DynamoDB operations, pointing to database throttling due to capacity exhaustion. Enabling DynamoDB auto scaling dynamically adjusts the provisioned read and write capacity to meet demand, resolving the errors and improving latency. Other options like increasing Lambda concurrency or API Gateway limits do not address the database throughput bottleneck.