I was trying to get information on how DynamoDB resolves sorting order for global secondary index when two items' hash key - range key values are the same. Does it refer to the original table's sort key?
Thank you.
The order appears to be undefined.
In a DynamoDB table, each key value must be unique. However, the key values in a global secondary index do not need to be unique.
[...]
Only the items with the specified key values appear in the response; within that set of data, the items are in no particular order.
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GSI.html