In their documentation AWS says about KeyConditionExpression for queries :
The condition can optionally perform one of several comparison tests on a single sort key value. This allows Query to retrieve one item with a given partition key value and sort key value, or several items that have the same partition key value but different sort key values.
However I couldn't manage to make it works for example to make something like pk = :pk AND (begins_with(sk,:foo) OR begins_with(sk,:bar))
I get error Invalid operator used in KeyConditionExpression: OR
. I saw some people with this issue as well on older posts saying dynamodb doesn't allow that but then I don't understand what AWS means in their documentation about doing several tests on sort keys. What does it means and how does it works ?
Thanks,