You can only query hashKey using the equality operator ( EQ ). If it is said that these values ("abcd_aaa", "abcd_bbb", "abcd_ccc") belong to your hashKey , then you must provide them completely. On the other hand, the Query operation allows partial matching on rangeKey with the possibility of several additional comparison operators:
EQ | LE | LT | GE | GT | BEGINS_WITH | BETWEEN
See the Query documentation for more information.
One possibility is to use hashKey and rangeKey , where the first part of your code will be hashKey and the last rangeKey , example:
hashKey : abcd rangeKey : aaa
By doing this with a hashKey (abcd) request, you will get all three records sorted by rangeKey
bsd
source share