Skip to content

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

@dion-conqa

Description

@dion-conqa

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions