1

I have a dynamoDB with a GSI with a hashKey and a rangeKey. I want to query the GSI for a list of hashKey-rangeKey.

For example, productKey = 123,456,789 product = productA

I tried a method like this, findByProductRefKeyInAndProduct(List productKeys, String product);

However, this does a scan on the table instead of a query.

Is it even possible to query the table for this type of request. I believe it should be, but I am not able to find the right way.

ufdeveloper
  • 387
  • 6
  • 19

1 Answers1

0

dynamoDB does not support querying for multiple values over a GSI in a single query. The recommended approach is to query for each value parallelly - DynamoDB batch execute QueryRequests

ufdeveloper
  • 387
  • 6
  • 19