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 — an SS/NS/BS with 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 null for an undefined field.
  • A value out of range for its type (see number overflow).

How to fix it

  1. Read the full message. DynamoDB names the offending parameter and the exact rule — that string is the fix.
  2. Give keys real values — never an empty string or empty binary in a partition/sort key.
  3. Drop empty sets — omit the attribute when a Set has no members, or store a scalar/NULL instead.
  4. Match types to the schema — send a numeric key as a number, a string key as a string; don't cross the wrappers.
  5. Strip undefined/null from the item before writing (the Document Client's removeUndefinedValues option 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.

Console なしで DynamoDB を扱う

DynoTable は DynamoDB 向けの高速なデスクトップクライアントです — テーブルを閲覧し、SQL スタイルのクエリを実行し、アイテムをローカルで編集できます。