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, because each item collection must fit on a single partition. 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: Collection size exceeded.An item collection is the set of all items with the same partition key value in the table and all of its LSIs. When a table has an LSI, DynamoDB stores each item collection on a single partition, so the collection is bounded by that partition's 10 GB capacity. A table without an LSI has no per-collection size limit (and GSIs have none either). So this error is a signal that one partition key's data has grown unbounded under an LSI. It's an HTTP 400; AWS lists it as retryable, but a retry only succeeds after the collection shrinks — reads and size-reducing writes (deletes, trimming attributes) are still allowed.
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
- 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. - 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).
- Trim LSI projections — project fewer attributes (
KEYS_ONLY/INCLUDE) to slow collection growth if you must keep the LSI. - Archive cold items out of the hot collection to a separate table or S3.
- Monitor before you hit the wall. Set
ReturnItemCollectionMetrics: SIZEon writes (PutItem,UpdateItem,DeleteItem,BatchWriteItem,TransactWriteItems); DynamoDB returns aSizeEstimateRangeGBestimate, and AWS recommends alerting at a user-defined threshold (8 GB, for example) so you act before 10 GB.
From DynoTable
Find the partition key approaching 10 GB — open the table with ⌘K, sort by partition key, and count items per collection. The item size calculator estimates growth when wide LSI projections inflate collections.
Compare LSI write cost against a GSI migration with the pricing calculator. Switch profiles with ⌘P; see Connect to AWS and Install.
Sources
- Local secondary indexes (verified 2026-07-13)
- PutItem — Amazon DynamoDB API Reference (verified 2026-07-13)
Related errors
- ItemCollectionSizeLimitExceededException — the same exception, with the general capacity framing.
- Item size has exceeded the maximum allowed size — the separate per-item 400 KB cap.
- Learn: Item collections · GSI vs LSI · Indexes overview
References
- Local secondary indexes — Amazon DynamoDB Developer Guide
- Error handling with DynamoDB — Amazon DynamoDB Developer Guide
- Quotas in Amazon DynamoDB — Amazon DynamoDB Developer Guide
- PutItem — Amazon DynamoDB API Reference
Last verified 2026-07-13 against the official AWS documentation linked above.