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

CatalogUpdaterLambda loads only first 25 usage plans #257

Closed
paulmakh opened this issue Apr 8, 2019 · 6 comments
Closed

CatalogUpdaterLambda loads only first 25 usage plans #257

paulmakh opened this issue Apr 8, 2019 · 6 comments

Comments

@paulmakh
Copy link

paulmakh commented Apr 8, 2019

Lambda catalog-updater uses exports.gateway.getUsagePlans({}) for load usage plans.
getUsagePlans() function has input parameter:

var params = {
  keyId: 'STRING_VALUE',
  limit: 'NUMBER_VALUE',
  position: 'STRING_VALUE'
};

By default limit number is 25. (https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/APIGateway.html#getUsagePlans-property)

So currently the lambda loads only first 25 usage plans.

@paulmakh
Copy link
Author

paulmakh commented Apr 8, 2019

The same issue is in DevPortalLambda when it loads APIs and Usage Plans

@echo-bravo-yahoo
Copy link
Contributor

Ah! Thanks for the bug report. We'll take a look at implementing pagination on it. Do you currently have more than 25 usage plans, and are they all in use?

@paulmakh
Copy link
Author

Yes, currently we have around 50 usage plans. Would you like to say that is unusual?

@echo-bravo-yahoo
Copy link
Contributor

@paulmakh, It is a little unusual! Typically, a usage plan represents either a tier of usage ("free", "paid", "premium", "enterprise") or a bundle of products ("housing APIs", "restaurant APIs", "review APIs"). Could you explain your use case a bit more to help me understand it?

@paulmakh
Copy link
Author

paulmakh commented Apr 30, 2019

@Trial-In-Error - We have few services and few consumers and would like to manage how to each consumer use each service separately. So we create usage plan for each consumer for each service.

@alex-chew
Copy link
Contributor

This issue is fixed as of v3.0.2.

jinman added a commit to jinman/aws-api-gateway-developer-portal that referenced this issue Jun 25, 2020
Currently, due to default limit of 25, getRestAPis is getting only 25 APIs and even with usagePlan fix awslabs#257 does not show all the apis in the portal because usageplan APIs are filtered with apis list. Hence add this will help query a larger limit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants