Search code examples
node.jsamazon-web-servicesamazon-dynamodbdynogels

Unable to query using only the rangeKey


I just started working on DynamoDB so please forgive me if the following seems like a dumb mistake.

  • I have a model with a hashKey and a rangeKey. Let's name these as HASH and RANGE respectively.
  • A global secondary index: GlobalIndex is added to the model as well.

Now what I want is to get the list of records by rangeKey. I don't want to use the scan operation since it impacts the performance. I am unable to achieve this with the query operation. Trying to achieve something like this with dynogels.

Any kind of help would be really helpful.

Thanks.

Dynogels: 9.0.0
Node: 6.10.3


Solution

  • It was a mistake on my end. The index has the same hash key and range key as the table. The GitHub issue thread for the same: https://github.com/clarkie/dynogels/issues/137