Error: DynamoDB is missing the key id in the item

Answered by Rafal Wilinski
Last updated: October 23rd, 2026
Solution
“Missing the key id in the item” means the target table requires an attribute named id, but the submitted item does not contain it in the expected form. The required name comes from that table’s schema; id is not a universal DynamoDB key name.
import boto3
table = boto3.resource("dynamodb", region_name="us-east-1").Table("Orders")
table.put_item(Item={"id": "ORDER#123", "status": "NEW"})This example assumes a string partition key named id and no sort key. Check DescribeTable before adapting it. A composite-key table requires both key attributes. For UpdateItem, put the key in Key; for PutItem or a batch PutRequest, include it in Item.
Check case, undefined or omitted values, mapper annotations, and accidental nesting. Boto3 does not invent a missing primary key. UpdateTable cannot change an existing table’s primary key schema; changing key design requires creating a new table and migrating data.
See primary key design and AWS documentation.
Other Common DynamoDB Errors (with Solutions)
- could not unmarshal the value dynamodb
- DynamoDB scan does not return all items
- DynamoDB Local Cannot Create Preexisting Table
- moto dynamodb not working
- DynamoDB scan filter not working
- ImportError: No module named boto3 (DynamoDB)
- ConfigError: Missing region in config
- DynamoDB Local NoClassDefFoundError
- DynamoDB Contains not working
- DynamoDB stream not working
- KMS Key Access Denied Error DynamoDB
- DynamoDB attribute not empty
- DynamoDB Update Not Working
- dynamodb unable to parse base64 string
- AWS DynamoDB CredentialsError: Missing credentials in config
Dynobase is a Professional GUI Client for DynamoDB
Start your 7-day free trial today
Product Features
DynamoDB Tools
- SSH GUI Client
- Chat With Cloud
- MongoDB GUI Client
- AWS Cost Monitoring
- DynamoDB Query Builder
- DynamoDB Code Examples
- DynamoDB Node.js Queries
- DynamoDB JSON Converter
- DynamoDB UUID Generator
- DynamoDB Local Admin GUI
- DynamoDB Pricing Calculator
- DynamoDB Single-Table Design
- Best DynamoDB GUI Clients
- Dynobase vs DynoTable