The DynamoDB Item Size Limit (400 KB)
A single DynamoDB item can hold at most 400 KB of data. Coming from MongoDB (16 MB documents) or a relational row, that ceiling feels low.
You tend to discover it the hard way, when a write that worked for months fails with a
ValidationException because one item grew too big.
What is the maximum item size in DynamoDB?
400 KB (409,600 bytes) per item, counting attribute names and values together. It is a fixed constraint, not a quota you can raise, so an item that reaches it has to be reshaped.
- Names count, not just values. Every attribute name, on every item, adds its UTF-8 bytes; so does every element inside a list, map or set.
- The usual cause is unbounded growth: a list embedded in a parent item that grows with traffic.
- Three ways out, from AWS's own guidance: split the growing data into separate
items, compress large attribute values into
Binary, or store the blob in Amazon S3 and keep its key on the item.
The problem: the item that grows forever
Say you keep an audit trail for each customer account, and you decide to store the account's audit events as a list on the account item:
PK: ACCOUNT#A-7741 events: [ {ts, actor, action}, {ts, actor, action}, ... ]For a day or two it's fine. But every sign-in, settings change and key rotation adds an event, and events never stop, so the list grows without bound.
Eventually one more append would make the item larger than 400 KB, and DynamoDB rejects
the update with
ValidationException: Item size to update has exceeded the maximum allowed size.
From then on the item can't grow at all, so you can no longer record audit events for
that account. (A PutItem of an oversized item gets a slightly different sentence:
Item size has exceeded the maximum allowed size.)
The cost hurts before the failure does. An UpdateItem is billed on the larger of the
item's before and after sizes, so appending one small event to a 300 KB item costs
301 WCU.
Embedding works only when the "many" side is bounded and small. An unbounded one-to-many relationship needs its own items.
What counts toward 400 KB
DynamoDB measures the item's total size as the sum of:
- Every attribute name, UTF-8 encoded. A 20-character name repeated across millions of items is size and storage you pay for, so keep names short on high-volume items.
- Every attribute value. Strings and binary by their byte length, numbers by a compact encoding (AWS calls its size "approximately" one byte per two significant digits, plus one), booleans and nulls by 1 byte.
- Nested structure. A list or map counts its own overhead plus the size of every element and key inside it, all the way down.
Two other caps apply inside that budget. Key attributes have their own maximums: a partition key value up to 2,048 bytes and a sort key value up to 1,024 bytes.
On a table with a local secondary index, each item plus its entries in all the LSIs (keys and projected attributes) must also fit in 400 KB. Beyond that, no single attribute has a cap of its own.
The AWS item-size documentation spells out the exact byte accounting, and the constraints page lists the key and LSI limits.
What a large item costs
Size drives cost on every request, not only at the cap. Reads are metered in 4 KB units and writes in 1 KB units, so a 400 KB item costs 100 RCU to read strongly (50 if eventually consistent) and 400 WCU to write.
Every update to a big item pays for the whole item, even when it changes one attribute. That is the case for small, targeted items: read and write only the part you need.
Modeling around it
Pick the remedy by what is growing.
An unbounded list → its own items. For the audit example, stop embedding. Give each event its own item in the same partition as the account, ordered by timestamp on the sort key:
PK: ACCOUNT#A-7741 SK: EVT#2026-06-27T10:00:05Z actor, action
PK: ACCOUNT#A-7741 SK: EVT#2026-06-27T10:00:10Z actor, actionNow no single item grows, and one Query on ACCOUNT#A-7741, with the sort key limited
to the EVT# prefix, still pulls the account's events back in time order from one
item collection.
One large text value → compress it. A long description, log or document body
compresses well: GZIP it into a Binary attribute. Per AWS, compressed values aren't
useful for filtering, so leave the attributes you filter on uncompressed.
A blob (image, PDF, large JSON) → S3. Store the object in Amazon S3 and keep only its key on the item. DynamoDB has no transaction that spans S3, so your code has to clean up orphaned objects when a write fails halfway.
Compression buys headroom; it doesn't fix a list that grows forever. Bounded sub-lists (a handful of tags, a fixed config block) are fine to embed. Unbounded ones become items.
Keep a list bounded at write time
If you do keep a capped list on an item, enforce the cap in the write itself, so overflow
becomes a ConditionalCheckFailedException you handle instead of a size error. The
if_not_exists and attribute_not_exists parts let the first append create the list:
await client.send(
new UpdateItemCommand({
TableName: 'AuditLog',
Key: {PK: {S: 'ACCOUNT#A-7741'}, SK: {S: 'META'}},
UpdateExpression: 'SET events = list_append(if_not_exists(events, :empty), :e)',
ConditionExpression: 'attribute_not_exists(events) OR size(events) < :max',
ExpressionAttributeValues: {
':e': {L: [{M: {action: {S: 'sign-in'}}}]},
':empty': {L: []},
':max': {N: '100'}
}
})
);Update expressions and condition expressions cover the syntax.
Rescue an item that already hit the cap
Writes that shrink an item still succeed. Start writing new events as EVT#<ts> items
now, copy the embedded list out with BatchWriteItem (25 items per call), then
REMOVE events from the parent.
Budget for that last update: it bills the item's full size before the removal, about 400 WCU for an item at the cap.
Checking item size in DynoTable
Before you commit to a shape, weigh a representative item. In DynoTable, Quick View shows an item's estimated DynamoDB size beside its attributes, so you catch a too-heavy shape while browsing real data, not at the failed write.
Prefer to stay in the browser? The DynamoDB item size calculator does the same from a pasted sample and reports the KB plus the RCU/WCU each read and write will cost.
In production, ask DynamoDB directly. AWS recommends setting ReturnConsumedCapacity on
writes and alerting on items that approach 400 KB: a single write reporting hundreds of
WCU is an item near the cap.

Checking the byte accounting against DynamoDB
ConsumedCapacity reports units, not bytes, and a write of N bytes costs
ceil(N / 1024) WCU. That is coarse in general but exact at a boundary: an item of
exactly 1,024 bytes must cost 1 WCU, and one of 1,025 bytes must cost 2.
So each test item below was padded with a single string attribute to land on a boundary, sized by counting attribute-name and value bytes, written once, and its consumed capacity read back:
| Item | Computed bytes | Predicted WCU | Billed WCU |
|---|---|---|---|
| 1 KB exactly | 1,024 | 1 | 1 |
| 1 KB + 1 byte | 1,025 | 2 | 2 |
| 2 KB exactly | 2,048 | 2 | 2 |
| 2 KB + 1 byte | 2,049 | 3 | 3 |
| 4 KB exactly | 4,096 | 4 | 4 |
The 1,024- and 1,025-byte items differ by one character of padding, and DynamoDB bills them differently exactly where the computed size says the step falls.
That confirms the name-plus-value accounting for strings; numbers are sized only approximately, so leave yourself headroom when an item mixes many of them.
One byte over a kilobyte costs a whole extra WCU on every write, and at 4 KB the same step appears on the read side. Trimming an item from 1,025 bytes to 1,024 halves the cost of each later write; padding it from 1,024 to 1,025 doubles it.
Pitfalls + next steps
- Embedded lists that grow with traffic are the usual way an item reaches 400 KB.
Move them to their own items, or cap them with a
size()condition as shown above. - Shorten attribute names on high-volume items to win back size and storage.
- Big values belong in S3 (keep the key on the item), and large text compresses into
Binary. - Related: denormalization and one-to-many relationships cover when to embed vs split; DynamoDB limits lists the other caps.
To weigh your own items, download DynoTable: Quick View shows each item's estimated size, and the table overview shows the average item size (a DynamoDB estimate, refreshed about every six hours).
Capacity figures verified 2026-07-26 against the live DynamoDB service in us-east-1 and reproduced on DynamoDB Local 3.3.1.


