Supplied AttributeValue is empty, must contain exactly one of the supported datatypes
TL;DR — One of the attributes in your Item (or key) has an AttributeValue with no value inside it — an empty set, an empty string/binary in a key attribute, a null/undefined field, or a wrapper with no S/N/BOOL/… member. DynamoDB requires every AttributeValue to hold exactly one supported type. Remove the empty attribute or give it a real value.
What it means
ValidationException: Supplied AttributeValue is empty, must contain exactly one of the supported datatypesDynamoDB rejected the request while validating the shape of an item: an AttributeValue was present but carried nothing DynamoDB can store. Every AttributeValue must contain exactly one typed value (S, N, B, SS, NS, BS, M, L, NULL, or BOOL). It's an HTTP 400, not retryable — the same item fails again until you fix the attribute.
This is distinct from ExpressionAttributeValues contains invalid value: that one is about a :placeholder in an expression; this one is about an attribute in the item body itself (PutItem, BatchWriteItem, TransactWriteItems).
Why it happens
- An
undefined/nullfield in the object you're writing — the marshaller emits an empty AttributeValue instead of skipping orNULL-typing it. - An empty Set —
SS,NS, orBSmust have at least one member. An empty set is invalid everywhere. - An empty string in a key attribute — non-key string attributes may be
"", but a table or index key attribute may not. - An empty binary value in a key — same rule as strings: empty binary is fine for non-key attributes (and inside sets, lists, and maps), never for a key.
- A nested empty set buried inside a
MaporListyou're persisting — nested empty strings and binary values are allowed; nested empty sets are not.
How to fix it
- Strip empty/
undefinedattributes before writing. Build theItemfrom only the fields that actually have values; drop the rest instead of sending an empty wrapper. - For the Document Client, enable empty-value handling.
@aws-sdk/lib-dynamodb'sremoveUndefinedValues: truemarshalling option dropsundefinedfields so they never reach the wire. (Empty strings and binary values for non-key attributes are allowed by DynamoDB directly.) - Never send an empty Set — omit the attribute entirely when the set has no members, or store a
NULL. - Give key attributes real values — a partition/sort key (table or index) can never be an empty string or empty binary.
- Walk nested Maps/Lists for stray empty sets if the offending attribute isn't top-level.
FAQ
What does "Supplied AttributeValue is empty" mean in DynamoDB? An attribute in your item has an AttributeValue that contains no stored value — an empty string or binary in a key attribute, an empty Set, or a null/undefined field. Every AttributeValue must contain exactly one supported datatype, so DynamoDB rejects the write.
How do I stop DynamoDB rejecting empty values? Remove empty and undefined attributes before writing (or use the Document Client's removeUndefinedValues option). Never send an empty Set — omit the attribute or store a NULL. Key attributes must always carry a real, non-empty value.
Related errors
- ExpressionAttributeValues contains invalid value — the same class of problem in an expression placeholder.
- ValidationException (overview)
- Learn: DynamoDB data types · JSON marshalling
References
- Supported data types and naming rules in Amazon DynamoDB — Amazon DynamoDB Developer Guide
- AttributeValue — Amazon DynamoDB API Reference
- Error handling with DynamoDB — Amazon DynamoDB Developer Guide
Last verified 2026-07-13 against the official AWS documentation linked above.