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:

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 #name or :value placeholder.
  • 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

  1. 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").
  2. Match it to the variant above and apply that page's fix.
  3. Validate the request shape locally before sending — most ValidationExceptions are a typo in an expression or a type wrapper.

Trabalhe com o DynamoDB sem o Console

O DynoTable é um cliente desktop rápido para o DynamoDB — navegue pelas tabelas, execute consultas no estilo SQL e edite itens localmente.