DynamoDB ValidationException
TL;DR — A ValidationException means DynamoDB rejected the request as malformed before touching any data. Read the message text: it names the exact parameter at fault. Nothing was written, so fix the request shape and retry.
What it means
ValidationException is DynamoDB's catch-all client error (HTTP 400) for a request that fails validation — a bad expression, a value in the wrong type wrapper, a key that doesn't match the table's schema, or a limit exceeded. It is not retryable: sending the same request again produces the same error.
Because it is a family of errors, the fix depends entirely on the message string. The most common variants each have their own page:
- Query condition missed key schema element
- The provided key element does not match the schema
- Invalid UpdateExpression syntax
- ExpressionAttributeValues contains invalid value
- Item size has exceeded the maximum allowed size
Why it happens
- A KeyConditionExpression that doesn't include the partition key, or references a non-key attribute.
- A key attribute whose type doesn't match the table definition (e.g. sending a number as a string).
- A malformed UpdateExpression / ConditionExpression / FilterExpression — a reserved word used raw, a missing
#nameor:valueplaceholder. - Empty values where they aren't allowed, or an attribute that resolves to an unsupported type.
- A limit exceeded — item over 400 KB, too many items in a
BatchWriteItem, expression too long.
How to fix it
- Read the full message. DynamoDB tells you which parameter failed — the string is precise ("Invalid UpdateExpression: Attribute name is a reserved keyword; reserved keyword: status").
- Match it to the variant above and apply that page's fix.
- Validate the request shape locally before sending — most
ValidationExceptions are a typo in an expression or a type wrapper.
Related errors
- ConditionalCheckFailedException — a condition failed (not malformed; the write was valid but rejected).
- ResourceNotFoundException — the table or index doesn't exist.