amplify-cli icon indicating copy to clipboard operation
amplify-cli copied to clipboard

nextToken in dynamo client in aws-sdk

Open artista7 opened this issue 7 years ago • 3 comments

Note: If your feature-request is regarding the AWS Amplify Console service, please log it in the official AWS Amplify Console forum

I saw, resolver templates uses a param nextToken for paginated query/scan in dynamo db. Is there a similar provision if we use dynamo client from aws-sdk directly?

artista7 avatar Jul 05 '19 07:07 artista7

yes, but I recommend using dynamodb's "document interface", which handles pagination for you automatically. See note at the end of this section:

The AWS SDKs handle the low-level DynamoDB responses (including the presence or absence of LastEvaluatedKey), and provide various abstractions for paginating Scan results. For example, the SDK for Java document interface provides java.util.Iterator support, so that you can walk through the results one at a time.

orozcoadrian avatar Jul 05 '19 17:07 orozcoadrian

Closing this ticket. Should you have any additions questions/issue about the resolver template please feel free to reopen.

SwaySway avatar Jul 05 '19 22:07 SwaySway

This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels for those types of questions.

github-actions[bot] avatar May 27 '21 06:05 github-actions[bot]