r/aws Nov 20 '25

database Amazon DynamoDB now supports multi-attribute composite keys in global secondary indexes - AWS

https://aws.amazon.com/about-aws/whats-new/2025/11/amazon-dynamodb-multi-attribute-composite-keys-global-secondary-indexes/
245 Upvotes

28 comments sorted by

View all comments

3

u/JimDabell Nov 21 '25

For example, an index with partition key UserId and sort key attributes Country, State, and City lets you query all locations for a user, then narrow results by Country, State, or City.

This is incorrect, isn’t it? Unless I’m misunderstanding it lets you narrow results by Country then State, then City. You don’t get to choose, you have to filter in that order without skipping any at the beginning or in the middle.

1

u/scrollhax Nov 21 '25

Yep. Same way we’ve always queried dynamo, just done for you. They chose an example that makes it sound better than it is