How does throttling on my global secondary index affect my DynamoDB table?

Last updated: 2020-05-18

My global secondary index (GSI) is being throttled. How does this affect the base Amazon DynamoDB table?

Short Description

Throttling on a GSI affects the base table in different ways, depending on whether the throttling is for read or write activity:

  • When a GSI has insufficient read capacity, the base table isn't affected.
  • When a GSI has insufficient write capacity, write operations won't succeed on the base table or any of its GSIs.

For more information, see Using Global Secondary Indexes in DynamoDB.

Resolution

To prevent throttling:

  • Be sure that the provisioned write capacity for each GSI is equal to or greater than the provisioned write capacity of the base table. To modify the provisioned throughput of a GSI, use the UpdateTable operation. If automatic scaling is enabled on the base table, it's a best practice to apply the same settings to the GSI. You can do this by choosing Apply same settings to global secondary indexes in the DynamoDB console. For more information, see Enabling DynamoDB Auto Scaling on Existing Tables.
  • Be sure that the GSI's partition key distributes read and write operations as evenly as possible across partitions. This helps prevent hot partitions, which can lead to throttling. For more information, see Designing Partition Keys to Distribute Your Workload Evenly.
  • Use Amazon CloudWatch Contributor Insights for DynamoDB to identify the most frequently throttled keys.

Did this article help you?

Anything we could improve?


Need more help?