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

ListShards Failure With Large Number of Shards #109

Open
jasonpepper opened this issue Mar 18, 2020 · 2 comments
Open

ListShards Failure With Large Number of Shards #109

jasonpepper opened this issue Mar 18, 2020 · 2 comments
Labels

Comments

@jasonpepper
Copy link
Contributor

If you have a stream with a large number of shards, you get an error that says, "[BROKER] ListShards error: InvalidArgumentException: NextToken and StreamName cannot be provided together."

The AWS docs say, "Don't specify StreamName or StreamCreationTimestamp if you specify NextToken because the latter unambiguously identifies the stream."

https://docs.aws.amazon.com/kinesis/latest/APIReference/API_ListShards.html

This shouldn't happen unless the number of shards is greater than the default value for MaxResults which is 10,000. But I'm seeing it in a stream with 1,266 shards (including closed ones).

I'm using version 0.3.2 of the library.

@slydon
Copy link

slydon commented Mar 31, 2020

The documentation is wrong, it is definitely 1,000 shards.

@harlow harlow added the bug label Apr 28, 2020
@LyleScott
Copy link

To anyone reading this, maxresults is indeed max 10k. It Defaults to 1k. So, to fix this, supply MaxResults > the number of shards. Or a smaller MaxResults and paginate that many at a time using NextToken.

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

No branches or pull requests

4 participants