AWS Certified Developer – Associate (DVA-C02)Troubleshooting and MonitoringHard

A developer is building a serverless application using AWS Lambda and Amazon DynamoDB. The application experiences intermittent 'ProvisionedThroughputExceededException' errors when writing to a specific DynamoDB table, especially during peak traffic. The table is configured with on-demand capacity mode, and the Lambda function is retrying failed writes with exponential backoff. Which of the following is the MOST likely reason for these errors, given the on-demand capacity mode?

  1. AThe DynamoDB table's burst capacity is being depleted faster than it can replenish during sustained high traffic.
  2. BThe Lambda function's concurrency limit is too high, overwhelming DynamoDB with too many concurrent requests.
  3. CThe DynamoDB table has reached its maximum throughput limit for on-demand capacity mode for the partition key being accessed.
  4. DThe IAM role associated with the Lambda function does not have sufficient permissions to write to the DynamoDB table.
Show answer & explanation

Correct answer: A. The DynamoDB table's burst capacity is being depleted faster than it can replenish during sustained high traffic.

Even with on-demand capacity, DynamoDB has burst capacity that allows it to handle sudden spikes. However, if sustained high traffic exceeds the table's previous peak for an extended period, the burst capacity can be depleted faster than it can replenish. In such cases, DynamoDB may temporarily return 'ProvisionedThroughputExceededException' errors until its internal scaling mechanisms catch up or burst capacity replenishes. This is a common misunderstanding of on-demand: it's not infinite immediately scalable, but scales based on previous peaks.

Why the other options are wrong

  • B. Lambda concurrency can contribute, but on-demand mode is designed to handle varying loads. The `ProvisionedThroughputExceededException` directly points to DynamoDB's capacity being the issue, not Lambda's concurrency itself being too high *for DynamoDB's capabilities*.
  • C. DynamoDB on-demand capacity scales automatically. While there are internal limits, it typically scales up to double the previous peak. The 'ProvisionedThroughputExceededException' indicates a temporary state of not meeting demand, which is often related to burst capacity and the scaling mechanism catching up, rather than a hard 'maximum' limit being hit in a way that couldn't be overcome.
  • D. Permissions issues would result in 'Access Denied' errors, not 'ProvisionedThroughputExceededException'.

DynamoDB On-demand Scaling Limits

DynamoDB's on-demand capacity provides automatic scaling, but it's not instantaneous or infinite. It scales up to double the previous peak throughput. If traffic *sustainedly* exceeds this capacity or depletes burst capacity faster than it can replenish, `ProvisionedThroughputExceededException` errors can still occur until DynamoDB's internal scaling mechanisms catch up.

  • Scales automatically, up to double previous peak.
  • Uses burst capacity for sudden spikes.
  • Sustained high traffic can deplete burst capacity.
  • Can still return `ProvisionedThroughputExceededException` during rapid, sustained increases.

Memory trick: On-Demand DynamoDB has 'Burst' power, but even that 'Bursts' if pushed too hard, too long.

More Troubleshooting and Monitoring questions