I'd like a list of all the primary sort keys from a table with a composite primary key (partition key and sort key). The table contains many partitions.
0
votes
2 Answers
1
votes
As the other answer mentions, Scan() would be your only solution over the table itself...
This would not be fast or cheap on a large table.
If you need this regularly, consider a couple other options:
- using a trigger (Dynamo streams + lambda) to track key values on insert
- a Global secondary index with a dummy hash key value, and sort key of the actual keys