fix: enforce 32-level attribute nesting depth on writes#123
Merged
pdf-amzn merged 1 commit intoMay 29, 2026
Merged
Conversation
Collaborator
|
please rebase and resolve conflicts |
jcshepherd
reviewed
May 27, 2026
jcshepherd
reviewed
May 27, 2026
Collaborator
jcshepherd
left a comment
There was a problem hiding this comment.
Overall looks okay. Please rebase/merge and resolve conflicts, then we can merge.
08475d6 to
5403445
Compare
cbbbbf0 to
3376a42
Compare
pdf-amzn
reviewed
May 29, 2026
| The following unenforced limits are tracked in `docs/technical-debt.md`: | ||
|
|
||
| 1. **Provisioned capacity decrease limit** (27/day) — would require per-table decrease counter with hourly replenishment | ||
| 2. **Attribute nesting depth** (32 levels) — requires recursive depth check in attribute value validation |
Collaborator
There was a problem hiding this comment.
The next time we touch this we should either switch to an unnumbered list or number them all 1. and let the markdown renderer number them, to minimize merge conflicts
pdf-amzn
approved these changes
May 29, 2026
Real DynamoDB rejects PutItem / UpdateItem / BatchWriteItem.PutRequest / TransactWriteItems.Put / ImportTable items whose Map or List values nest beyond 32 total levels (31 wrappers above a scalar) with ValidationException. ExtendDB previously accepted them. Closes the L-1 Attribute nesting depth row in docs/technical-debt.md and flips docs/dynamodb-limits.md from Not enforced to Enforced.
3376a42 to
47191ef
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
DynamoDB rejects items whose
MaporListvalues exceed 32 total nesting levels (31 wrappers above a scalar) withValidationException("Nesting Levels have exceeded supported limits"), per https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Constraints.html.The cap applies to values that get stored as item attributes:
PutItem.Item,UpdateItem.AttributeUpdates.<n>.Value,UpdateItem.UpdateExpressionSET targets resolved throughExpressionAttributeValues,BatchWriteItem.PutRequest.Item,TransactWriteItems.Put.Item, the sameSET-via-EAV (ExpressionAttributeValues) path insideTransactWriteItems.Update,ImportTableper-item contentWhy
Closes the
L-1 Attribute nesting depthtech-debt indocs/technical-debt.mdand theAttribute nesting depth (32 levels)entry indocs/dynamodb-limits.md"Unenforced Limits Requiring Tracking".Testing done
New tests added:
crates/core/src/validation/mod.rs(boundary, mixedMap/List, iterator helper, recursion-coverage on multiple top-level attributes / wideMap/ wideList).crates/core/src/expression/resolver.rs(direct reference, function args, arithmetic, nested function, path-only).tests/test_item_operations.py::TestNestingDepthDocumentation
docs/dynamodb-limits.md: flips theAttribute nesting depthrow in the Items table fromNot enforcedtoEnforced, points atvalidate_item_nesting_depthand the call sites, removes the limit from theUnenforced Limits Requiring Trackingchecklist, and updates the enforcement-coverage summary (Items: 5/0/1 → 6/0/0; Total: 28/0/18 → 29/0/17).docs/technical-debt.md: removes theL-1 Attribute nesting depthrow fromUnenforced DynamoDB Limitsand renumbers the remaining entries.Checklist
cargo test --workspace)cargo fmt --check)cargo clippy --all-targets --workspace -- -D warnings)Breaking changes
None.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache License 2.0 and I agree to the Developer Certificate of Origin (DCO). See CONTRIBUTING.md for details.