DynamoDB S3 import failed — invalid format

TL;DR — ImportTable finished with status FAILED, FailureCode: ItemValidationError, and the message "Some of the items failed validation checks and were not imported." The source objects don't match the InputFormat/InputCompressionType you declared, or the items are missing the primary key. Fix the format/compression to match the objects, confirm every item carries the key, and re-run the import.

What it means

"FailureCode": "ItemValidationError",
"FailureMessage": "Some of the items failed validation checks and were not
imported. Please check CloudWatch error logs for more details."

# In /aws-dynamodb/imports CloudWatch logs:
ValidationException: One or more parameter values were invalid: Missing the key pk in the item

DynamoDB Import from S3 validates each object against the format and compression you declared in the ImportTable call — the InputFormat (DYNAMODB_JSON, ION, or CSV) and InputCompressionType (GZIP, ZSTD, or NONE) take precedence over the file extension. If the bytes don't parse as declared, or an item lacks the table's primary key, that item is skipped (the import continues with the next item) and the job ends FAILED.

Why it happens

  • Format mismatch — you specified DYNAMODB_JSON but the objects are actually CSV (or plain JSON), so nothing parses.
  • Compression mismatch — objects under the prefix are compressed differently (some GZIP, some NONE); they must all use the same one.
  • Unsupported compression — only GZIP, ZSTD, or NONE are allowed; other codecs fail.
  • Missing primary key — a CSV/JSON item has no column/attribute matching the declared partition (or sort) key: "Missing the key pk in the item."
  • Key type mismatch — the imported key's type doesn't match the table's AttributeDefinitions (e.g. a numeric key imported as a string).
  • An unparsable object under the prefix — every object matching the prefix is read as data, so a stray placeholder or malformed file fails validation.

How to fix it

  1. Make InputFormat match the actual bytes — CSV files → CSV, DynamoDB JSON → DYNAMODB_JSON, Amazon Ion → ION.
  2. Make every object under the prefix use the same compression, and set InputCompressionType to match (GZIP/ZSTD/NONE).
  3. Ensure each item has the primary key — for CSV, include the key column (and header) with a name matching the declared KeySchema.
  4. Match key attribute types to the table's AttributeDefinitions (S/N/B).
  5. Read the CloudWatch error logs at /aws-dynamodb/imports, log stream <import-id>/error, for the exact per-item reason.
  6. Keep only parseable data objects under the prefix; upload data via CLI/SDK rather than creating folders in the console.

DynoTable workbench

Validate import files before upload — export a sample item from DynoTable as DynamoDB JSON (⌘K → copy item) and confirm key attributes in the JSON converter. Check item sizes with the item size calculator when large objects cause parse failures.

Configure the S3 account profile under Settings → Profiles with Test Connection; switch with ⌘P. See Connect to AWS and Install.

Sources

References

Last verified 2026-07-13 against the official AWS documentation linked above.

Work with DynamoDB without the Console

A fast DynamoDB desktop client that runs the real SQL DynamoDB can’t — JOINs, GROUP BY, aggregates — with visual editing and an AI agent on your own Bedrock keys.

Free 30-day trial, no credit card — then the Free plan with no time limit.