Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nextToken isn't correct when querying against an LSI #7

Open
dion-conqa opened this issue Sep 26, 2023 · 0 comments
Open

nextToken isn't correct when querying against an LSI #7

dion-conqa opened this issue Sep 26, 2023 · 0 comments

Comments

@dion-conqa
Copy link

Hi,

When querying against a table using an LSI we founf that the generated nextToken returned isn't valid to use as a ExclusiveStartKey.

If you pass the token that was returned as the from in paginateQuery DynamoDB returns ValidationException: The provided starting key is invalid.

We found that when using an LSI with the v3 DynamoDB Client the LastEvaluatedKey returned is the HashKey, the table's SortKey and the LSI SortKey.

I think to add support for this would require something like schema being updated to take an optional third parameter to represent the LSI SortKey, which buildLastEvaluatedKey use to return the required keys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant