dynobase-icon
Dynobase

Question: Can DynamoDB have null values?

Rafal Wilinski

Answered by Rafal Wilinski

Last updated: October 23rd, 2026

Answer

Yes. DynamoDB has a native NULL attribute type, and reads return null-valued attributes unless your projection excludes them. A stored null is not the same thing as an attribute that does not exist.

In the low-level API, an explicit null is represented as {"NULL": true}. The JavaScript document client accepts null, and boto3's table interface accepts Python None. Neither requires storing the string "null".

To distinguish the cases in expressions:

  • attribute_exists(#field) is true when the attribute exists, even if its value is null.
  • attribute_not_exists(#field) checks for a missing attribute.
  • attribute_type(#field, :type) with :type set to the string NULL checks for an explicit null.

Use an expression-name alias for #field and supply the value placeholder in the appropriate client format. A Query filter checks these expressions after reading matching key data, so it does not make null searches into indexed lookups.

Primary-key and index-key attributes must use supported scalar key types, not NULL. To omit an item from a sparse GSI, leave out an index-key attribute instead of setting it to null. See data types and filter expressions.

Source: AWS data types.

Dynobase is a Professional GUI Client for DynamoDB

Start your 7-day free trial today

Product Features

Download
/
Pricing
/
Member Portal
/
Privacy
/
EULA
/
Twitter
© 2026 Dynobase
+
Still using AWS DynamoDB Console?
Try Dynobase to accelerate your DynamoDB workflow. Start your 7-day free trial today.