DynamoDB LSI item collection 10 GB limit

TL;DR — On a table with a Local Secondary Index, an item collection — every item sharing one partition key, plus their LSI projections — can total at most 10 GB. Only LSI tables have this cap; it's the price of the LSI's ability to fetch un-projected base attributes. A write that would push a collection past 10 GB fails with ItemCollectionSizeLimitExceededException. Monitor ItemCollectionMetrics, re-shard the growing key, or replace the LSI with a GSI (which has no such limit).

What it means

ItemCollectionSizeLimitExceededException: Item collection size limit exceeded.

An item collection is the set of all items with the same partition key. When a table has an LSI, DynamoDB co-locates each collection's base items and their LSI projections on the same partition, and that partition's collection is bounded at 10 GB. A table without an LSI has no per-collection size limit. So this error is a signal that one partition key's data has grown unbounded under an LSI.

Why it happens

  • An unbounded partition key — a big tenant, a busy user, or an append-only log all writing under one key.
  • The LSI itself — the 10 GB cap exists only because the table has an LSI (created at table-creation time and not removable).
  • Wide LSI projections — projecting many attributes into the LSI inflates the collection faster.
  • Steady growth that quietly approached 10 GB until a write finally crossed it.

How to fix it

  1. Re-shard the partition key. Split the oversized entity across multiple keys (TENANT#42#1, TENANT#42#2, …) so no single collection grows without bound.
  2. Replace the LSI with a GSI. GSIs have their own partition key and no item-collection size limit — for most access patterns a GSI is the better fit, and it can be added/removed after table creation (an LSI can't).
  3. Trim LSI projections — project fewer attributes (KEYS_ONLY/INCLUDE) to slow collection growth if you must keep the LSI.
  4. Archive cold items out of the hot collection to a separate table or S3.
  5. Monitor before you hit the wall. Set ReturnItemCollectionMetrics: SIZE on writes; DynamoDB returns a SizeEstimateRangeGB so you can alert well before 10 GB.

Reworking keys and indexes to escape the LSI limit? The DynoTable desktop app lets you filter by partition key so you can see which collection is oversized before you re-shard.

Trabaja con DynamoDB sin la Consola

DynoTable es un cliente de escritorio rápido para DynamoDB: explora tablas, ejecuta consultas estilo SQL y edita Items localmente.