Can DynamoDB store arrays?

Yes. DynamoDB stores arrays using the List (L) type — an ordered collection that can hold mixed types including strings, numbers, booleans, nulls, maps, and nested lists. For unordered collections of unique values, it also offers String, Number, and Binary Sets. There is no element-count limit as long as the item stays under 400 KB.

Lists (ordered arrays)

A List preserves order and allows duplicates and mixed types. It maps directly to a JSON array and can nest — lists of maps, lists of lists — arbitrarily deep.

Sets (unique values)

  • String Set (SS), Number Set (NS), Binary Set (BS) hold unique values of one type, unordered.
  • A set cannot be empty (that raises a ValidationException).

Use a Set when membership and uniqueness matter; use a List when order or mixed types matter.

Size, not count, is the limit

There is no cap on the number of values in a list, map, or set — only the 400 KB total item size constrains how much you can store.

Go deeper

See DynamoDB data types and convert nested structures with the JSON converter. Download DynoTable to edit list and set attributes.

不必透過主控台就能操作 DynamoDB

DynoTable 是一款快速的 DynamoDB 桌面用戶端 — 瀏覽表格、執行 SQL 風格的查詢,並在本機編輯項目。