DynamoDBMapper with DynamoDBMapperConfig used for query against GSI throws error #2903
Unanswered
codecheetos
asked this question in
Q&A
Replies: 1 comment
-
Using this doc as reference. |
Beta Was this translation helpful? Give feedback.
0 replies
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
-
I need help in troubleshooting issue with using DynamoDBMapper with DynamoDBMapperConfig object and using it to query against GSI. Here is my stacktrace.
I'm using gradle to build and run a quartz based scheduled job to query from a GSI index and perform some automation...
I understand that GSI needs to use
DynamoDBMapperConfig
withConsistentReads.EVENTUAL
and this is how I'm configuring the object and using it. Before doing the query, I'm confirming that consistency isEVENTUAL
, but not sure why it keeps complainingConsistent read cannot be true when querying a GSI
.... prints
EVENTUAL
.Finally, the
CarGeoTrackerModel
class is defined with@DynamoDBIndexHashKey
as follows...Any suggestions on what am I doing wrong? I tried to step debug in intellij but error is happening on DynamoDB server (which is running locally on docker). Here is my docker container.
My docker-compose.yml has this and see no errors in container logs.
When I use CLI with
--endpoint-url http://localhost:8000 --region us-east-1
with correct query arguments, the result is returned successfully, which is leading me to believe that its either SDK or my usage (99% likely) issue.Beta Was this translation helpful? Give feedback.
All reactions