[AWS CLI] Put a DynamoDB item from a JSON file

Created on November 30, 2026

You can pass a file:// path to aws dynamodb put-item --item to read the item from a JSON file. Save the following item as item.json.

{"id": {"S": "2"}, "name": {"S": "Bob"}}

Run this command from the directory containing item.json. It assumes DummyTable already exists and has a string partition key named id with no sort key.

aws dynamodb put-item \
    --table-name DummyTable \
    --item file://item.json

S marks each attribute as a string. If the table already contains an item with the same key, put-item replaces that item.

AWS CLI DynamoDB