Question: Can DynamoDB have nested objects?

Answered by Rafal Wilinski
Last updated: October 23rd, 2026
Answer
Yes. DynamoDB stores nested objects as Maps and nested arrays as Lists, with up to 32 levels of document nesting. All nested values count toward the complete item's 400 KB limit.
For example, an item can contain profile: { address: { city: "Seattle" } }. A document client stores that structure directly; do not call JSON.stringify unless you intentionally want an opaque string.
Use document paths in projections, conditions and updates. An update such as SET #p.#a.#c = :city can change the nested city when the parent maps exist. Map each alias to its attribute name. DynamoDB cannot automatically create a missing parent map from an update to one of its children, so initialize the structure first or write the complete parent map.
Nested fields are not eligible as index-key paths. If you frequently query by city, maintain a top-level scalar attribute such as cityKey and build the appropriate GSI. A filter on profile.address.city still reads items before filtering them.
Split independently growing collections into separate items when they would make the parent document large or create write contention. See JSON path filtering and GSI design.
Source: AWS document types.
Other Common DynamoDB FAQ (with Answers)
- How do you enable CloudTrail for DynamoDB?
- What are the differences between DynamoDB and Google Bigtable?
- How do you dump multiple DynamoDB tables?
- Is DynamoDB PaaS or SaaS?
- Is DynamoDB a memory store?
- Is DynamoDB serverless?
- Can you store objects as DynamoDB items?
- Can Tableau connect to DynamoDB?
- Can QuickSight read DynamoDB?
- Can you force-delete a DynamoDB table?
- How to count rows in DynamoDB?
- Does DynamoDB charge for storage?
- Is DynamoDB HIPAA compliant?
- How do you store Japanese characters in DynamoDB?
- Does DynamoDB support Multi-AZ?
Dynobase is a Professional GUI Client for DynamoDB
Start your 7-day free trial today