Error: dynamodb does not support null values

Answered by Rafal Wilinski
Last updated: October 23rd, 2026
Solution
DynamoDB supports the NULL attribute type. A message saying null values are unsupported usually concerns a key, a client mapper or an incorrectly serialized request, not a blanket service restriction.
// DynamoDBDocumentClient native value:
const item = { pk: "record-1", optionalNote: null };
// Equivalent low-level AttributeValue map:
const rawItem = { pk: { S: "record-1" }, optionalNote: { NULL: true } };With boto3 resource methods, Python None maps to NULL. A missing attribute is different: omit it on a put, or REMOVE it in an update. A NULL attribute still exists for attribute_exists checks.
Primary-key attributes must have valid scalar values. Optional GSI keys can be absent for sparse indexing, but cannot be NULL when present. Do not change a key schema to permit NULL; that is not supported. Empty non-key strings and binary values are a separate feature, and empty sets remain invalid. Check mapper-specific null handling if your SDK omits or removes null properties.
See data types and AWS documentation.
Other Common DynamoDB Errors (with Solutions)
- dynamodb cannot read property '0' of undefined
- error updating dynamodb table time to live
- DynamoDB cannot do operations on a non-existent table
- dynamodb connection timeout
- could not lookup table in dynamodb
- dynamodb scan missing values
- dynamodb could not instantiate class
- dynamodb query is not null
- dynamodb could not load credentials from any providers
- DynamoDB Local NoClassDefFoundError
- DynamoDB is missing the key id in the item
- DynamoDB scan filter not working
- DynamoDB Query Limit Not Working
- dynamodb no range key value present
- DynamoDB stream no records processed
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