You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then, if I use posts.paging.next as ExclusiveStartKey I got the following error:
{"data": {"posts": null},"errors": [{"message": "The request processing has failed because of an unknown error, exception or failure.","locations": [{"line": 2,"column": 3}],"path": ["posts"],"extensions": {"code": "INTERNAL_SERVER_ERROR","exception": {"message": "The request processing has failed because of an unknown error, exception or failure.","code": "InternalFailure","time": "2018-07-31T21:16:56.008Z","requestId": "10dc5a07-a18e-407b-bba3-ad57506d5fd2","statusCode": 500,"retryable": true,"stacktrace": ["InternalFailure: The request processing has failed because of an unknown error, exception or failure."," at Request.extractError (/home/node/node_modules/aws-sdk/lib/protocol/json.js:48:27)"," at Request.callListeners (/home/node/node_modules/aws-sdk/lib/sequential_executor.js:105:20)"," at Request.emit (/home/node/node_modules/aws-sdk/lib/sequential_executor.js:77:10)"," at Request.emit (/home/node/node_modules/aws-sdk/lib/request.js:683:14)"," at Request.transition (/home/node/node_modules/aws-sdk/lib/request.js:22:10)"," at AcceptorStateMachine.runTo (/home/node/node_modules/aws-sdk/lib/state_machine.js:14:12)"," at /home/node/node_modules/aws-sdk/lib/state_machine.js:26:10"," at Request.<anonymous> (/home/node/node_modules/aws-sdk/lib/request.js:38:9)"," at Request.<anonymous> (/home/node/node_modules/aws-sdk/lib/request.js:685:12)"," at Request.callListeners (/home/node/node_modules/aws-sdk/lib/sequential_executor.js:115:18)"]}}}]}
I have DynamoDB running in local inside of a Docker container with the InMemory flag set to true.
I thought that I only have to send GSI Key, that is composed by parent_post_id (partition key) and created_at (sort key) but reading in some places I found that I also have to send Table Key. If I remove post_id that is only part of Table Key I got the following error:
{"data": {"posts": null},"errors": [{"message": "Exclusive Start Key must have same size as table's key schema","locations": [{"line": 2,"column": 3}],"path": ["posts"],"extensions": {"code": "INTERNAL_SERVER_ERROR","exception": {"message": "Exclusive Start Key must have same size as table's key schema","code": "ValidationException","time": "2018-07-31T21:20:11.286Z","requestId": "f8961dcd-325c-4cda-8fa8-855539cae715","statusCode": 400,"retryable": false,"stacktrace": ["ValidationException: Exclusive Start Key must have same size as table's key schema"," at Request.extractError (/home/node/node_modules/aws-sdk/lib/protocol/json.js:48:27)"," at Request.callListeners (/home/node/node_modules/aws-sdk/lib/sequential_executor.js:105:20)"," at Request.emit (/home/node/node_modules/aws-sdk/lib/sequential_executor.js:77:10)"," at Request.emit (/home/node/node_modules/aws-sdk/lib/request.js:683:14)"," at Request.transition (/home/node/node_modules/aws-sdk/lib/request.js:22:10)"," at AcceptorStateMachine.runTo (/home/node/node_modules/aws-sdk/lib/state_machine.js:14:12)"," at /home/node/node_modules/aws-sdk/lib/state_machine.js:26:10"," at Request.<anonymous> (/home/node/node_modules/aws-sdk/lib/request.js:38:9)"," at Request.<anonymous> (/home/node/node_modules/aws-sdk/lib/request.js:685:12)"," at Request.callListeners (/home/node/node_modules/aws-sdk/lib/sequential_executor.js:115:18)"]}}}]}
And DynamoDB print this on console:
dynamo-forum | Jul 31, 2018 9:32:31 PM com.almworks.sqlite4java.Internal log
dynamo-forum | WARNING: [sqlite] SQLiteDBAccess$20@268969a1: job exception
dynamo-forum | java.lang.NullPointerException
dynamo-forum | at com.amazonaws.services.dynamodbv2.local.shared.access.sqlite.SQLiteDBAccessUtils.translateKeyAttributeValue(SQLiteDBAccessUtils.java:194)
dynamo-forum | at com.amazonaws.services.dynamodbv2.local.shared.access.sqlite.SQLiteDBAccess$20.doWork(SQLiteDBAccess.java:2012)
dynamo-forum | at com.amazonaws.services.dynamodbv2.local.shared.access.sqlite.SQLiteDBAccess$20.doWork(SQLiteDBAccess.java:1787)
dynamo-forum | at com.amazonaws.services.dynamodbv2.local.shared.access.sqlite.AmazonDynamoDBOfflineSQLiteJob.job(AmazonDynamoDBOfflineSQLiteJob.java:97)
dynamo-forum | at com.almworks.sqlite4java.SQLiteJob.execute(SQLiteJob.java:372)
dynamo-forum | at com.almworks.sqlite4java.SQLiteQueue.executeJob(SQLiteQueue.java:534)
dynamo-forum | at com.almworks.sqlite4java.SQLiteQueue.queueFunction(SQLiteQueue.java:667)
dynamo-forum | at com.almworks.sqlite4java.SQLiteQueue.runQueue(SQLiteQueue.java:623)
dynamo-forum | at com.almworks.sqlite4java.SQLiteQueue.access$000(SQLiteQueue.java:77)
dynamo-forum | at com.almworks.sqlite4java.SQLiteQueue$1.run(SQLiteQueue.java:205)
dynamo-forum | at java.lang.Thread.run(Thread.java:748)
dynamo-forum |
Hi @arivera-tiempodev Thank you for reporting this issue. I can reproduce it and it seems that this issue only happens in local DynamoDB and it works fine remotely. I'm not sure if this is a known issue, I will contact the service team to verify. You can also call out at the DynamoDB forum. One thing is sure that this is not an SDK issue.
I will comment here if hear back from the service team.
AllanZhengYP
added
service-api
This issue is due to a problem in a service API, not the SDK implementation.
investigating
Issue has been looked at and needs deep dive work by OSDS.
and removed
investigating
Issue has been looked at and needs deep dive work by OSDS.
labels
Aug 3, 2018
mwarger
added a commit
to mwarger/amplify-cli
that referenced
this issue
Sep 16, 2019
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.
lockbot
locked as resolved and limited conversation to collaborators
Nov 21, 2019
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
service-apiThis issue is due to a problem in a service API, not the SDK implementation.
I have a DynamoDB table that is generated with the following code:
Then I make queries like this:
When I send
null
orundefined
asLastEvaluatedKey
I get expected results:I got that object because I formatting like this:
Then, if I use
posts.paging.next
as ExclusiveStartKey I got the following error:I have DynamoDB running in local inside of a Docker container with the InMemory flag set to true.
I thought that I only have to send GSI Key, that is composed by
parent_post_id
(partition key) andcreated_at
(sort key) but reading in some places I found that I also have to send Table Key. If I removepost_id
that is only part of Table Key I got the following error:And DynamoDB print this on console:
And this is by
AWS-SDK
NPM package:The text was updated successfully, but these errors were encountered: