DynamoDB ItemCollectionSizeLimitExceededException

TL;DR — Only tables with a Local Secondary Index (LSI) have this limit: all items sharing one partition key (the "item collection") can total at most 10 GB. One of your partition keys crossed it. Redesign so no single partition key accumulates unbounded data — or drop the LSI.

What it means

ItemCollectionSizeLimitExceededException: Item collection size limit exceeded.

An item collection is every item with the same partition key, including their LSI projections. Tables without an LSI have no per-collection size cap (only the table's total is unbounded). Tables with an LSI cap each collection at 10 GB, and this error means a write would push one collection past it.

Why it happens

  • A hot/unbounded partition key — one key (a big tenant, a popular user) accumulates far more items than others.
  • An LSI you may not need — the 10 GB cap exists only because the table has an LSI.
  • Append-only growth under a single partition key over time.

How to fix it

  1. Re-shard the partition key. Split the oversized entity across multiple partition keys (e.g. TENANT#42#1, TENANT#42#2) so no single collection grows unbounded.
  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 choice anyway (and can be added/removed after table creation, unlike an LSI).
  3. Archive cold items out of the hot collection (to a separate table or S3).

Console 없이 DynamoDB 작업하기

DynoTable은 DynamoDB를 위한 빠른 데스크톱 클라이언트입니다 — 테이블을 탐색하고, SQL 스타일 쿼리를 실행하고, 항목을 로컬에서 편집하세요.