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 itemDynamoDB 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_JSONbut 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, orNONEare 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
- Make
InputFormatmatch the actual bytes — CSV files →CSV, DynamoDB JSON →DYNAMODB_JSON, Amazon Ion →ION. - Make every object under the prefix use the same compression, and set
InputCompressionTypeto match (GZIP/ZSTD/NONE). - Ensure each item has the primary key — for CSV, include the key column (and header) with a name matching the declared
KeySchema. - Match key attribute types to the table's
AttributeDefinitions(S/N/B). - Read the CloudWatch error logs at
/aws-dynamodb/imports, log stream<import-id>/error, for the exact per-item reason. - 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
- Import format quotas and validation (verified 2026-07-13)
- ImportTable — Amazon DynamoDB API Reference (verified 2026-07-13)
Related errors
- ResourceInUseException — the import target table name already exists.
- The provided key element does not match the schema — a key type mismatch.
- Learn: DynamoDB JSON marshalling · Export DynamoDB to CSV
References
- Import format quotas and validation — Amazon DynamoDB Developer Guide
- Requesting a table import in DynamoDB — Amazon DynamoDB Developer Guide
- ImportTable — Amazon DynamoDB API Reference
Last verified 2026-07-13 against the official AWS documentation linked above.