One or more parameter values were invalid
TL;DR — DynamoDB accepted the request shape but rejected a specific value inside it: an empty Set, an empty string in a key, a value whose type doesn't match the schema, or a null where one isn't allowed. Read the rest of the message — it names the exact parameter — and fix that value.
What it means
ValidationException: One or more parameter values were invalid: <specific reason>This is a ValidationException (HTTP 400) whose message body pinpoints one value that broke a rule. The prefix is generic; the important part is what follows it — for example An AttributeValue may not contain an empty string, Type mismatch for key, or An AttributeValue may not contain an empty set. It is not retryable as-is; the value has to change.
Why it happens
Common tails after "One or more parameter values were invalid":
An AttributeValue may not contain an empty string for key …— an empty""string in a key attribute (non-key strings are allowed to be empty, keys are not).An AttributeValue may not contain an empty set— anSS/NS/BSwith zero members. Sets must be non-empty.Type mismatch for key … expected: S actual: N— the value's type doesn't match the table's key schema.An number set may not be empty/ empty binary — same non-empty rule for number sets and binary.- A null value passed to an attribute that doesn't accept it, or a marshaller emitting
nullfor anundefinedfield. - A value out of range for its type (see number overflow).
How to fix it
- Read the full message. DynamoDB names the offending parameter and the exact rule — that string is the fix.
- Give keys real values — never an empty string or empty binary in a partition/sort key.
- Drop empty sets — omit the attribute when a Set has no members, or store a scalar/
NULLinstead. - Match types to the schema — send a numeric key as a number, a string key as a string; don't cross the wrappers.
- Strip
undefined/nullfrom the item before writing (the Document Client'sremoveUndefinedValuesoption handles the common case).
FAQ
What does "One or more parameter values were invalid" mean? A specific value in your request breaks a DynamoDB rule — most often an empty string in a key, an empty Set, a type that doesn't match the key schema, or a disallowed null. The full message names the exact parameter and reason.
Why does an empty string only fail sometimes? DynamoDB allows empty strings for non-key attributes but rejects them in key attributes. An empty string in a partition or sort key raises "An AttributeValue may not contain an empty string"; the same value in a regular attribute is accepted.
Related errors
- Supplied AttributeValue is empty — an item attribute with no typed value at all.
- The provided key element does not match the schema — a key type/shape mismatch.
- ValidationException (overview)