fix(dynamodb): store map keys in code point order on plain API writes (#9227)

AWS sorts the keys of every map in a PutItem, BatchWriteItem or TransactWriteItems item and in update values. PartiQL literals keep their written order. An update sorts each map on its document path again.

Step Functions dynamodb:putItem and dynamodb:updateItem tasks and IoT dynamoDBv2 rule actions are plain PutItem and UpdateItem calls on AWS, so their maps are stored in code point order too.
This commit is contained in:
TATSUNO “Taz” Yasuhiro authored and GitHub committed 2026-11-22 20:56:04 -04:00
1 parent 77c11493e7
commit 4d481ebccb
9 files changed
+705 -16

No files matched your search

+4
View File
@@ -219,6 +219,10 @@ Floci does the same on the `ReturnValues` of `PutItem`, `UpdateItem` and `Delete
`TransactWriteItems` cancellation reason. Each map is shuffled on its own. Lists and sets keep their order.
`GetItem`, `Query`, `Scan`, `BatchGetItem`, PartiQL and Streams return the same order on every call, as on AWS.
As on AWS, a map written through `PutItem`, `BatchWriteItem`, `TransactWriteItems` or the values of `UpdateItem`
is stored with its keys sorted by code point. A PartiQL literal keeps the order it is written in. An update sorts
each map on its document path again and leaves the other maps as they are. A value copied from another attribute
keeps the order of that attribute.
Set `FLOCI_SERVICES_DYNAMODB_RANDOMIZE_ATTRIBUTE_ORDER=false` to turn the shuffle off. The setting works with the native backend only. With the `local` backend, responses keep the order DynamoDB Local returns.
## Time to Live