Can DynamoDB have null values?

Yes. DynamoDB has a dedicated NULL type that represents an attribute with an unknown or undefined state. It also allows empty strings and empty binary values for non-key attributes, plus empty lists and maps. It does not allow empty sets (string, number, or binary), which are rejected with a ValidationException.

The NULL type

NULL is a real attribute type, written as {"NULL": true}. Use it when you want to record that a field exists but has no value — distinct from simply omitting the attribute.

What empties are allowed

  • Empty string / empty binary — allowed on non-key attributes, and inside lists and maps.
  • Empty list / empty map — allowed.

What is not allowed

  • Empty sets (SS, NS, BS) — rejected with a ValidationException.
  • Empty string or binary on a key attribute — key values must have length greater than zero.

Modeling tip

Omitting an attribute entirely is often cleaner than storing NULL, and it enables sparse indexes. Choose based on whether "absent" and "explicitly null" mean different things in your model.

Go deeper

Read DynamoDB data types and sparse indexes. Download DynoTable to edit attributes, including NULL, directly.

Console 없이 DynamoDB 작업하기

DynoTable은 DynamoDB를 위한 빠른 데스크톱 클라이언트입니다 — 테이블을 탐색하고, SQL 스타일 쿼리를 실행하고, 항목을 로컬에서 편집하세요.