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

All APIs not being fetched #1207

Closed
DilLip-Chowdary-Codes opened this issue Dec 6, 2022 · 1 comment
Closed

All APIs not being fetched #1207

DilLip-Chowdary-Codes opened this issue Dec 6, 2022 · 1 comment
Labels
bug Something isn't working next-release-candidate

Comments

@DilLip-Chowdary-Codes
Copy link

DilLip-Chowdary-Codes commented Dec 6, 2022

Context

As mentioned in the AWS Docs, we can have default limits of 600, 120 regional, and edge APIs respectively.

But we're fetching only limited (500) APIs, refer to the LOCs below.

response = self.apigateway_client.get_rest_apis(limit=500)

all_apis = self.apigateway_client.get_rest_apis(limit=500)

Expected Behavior

To fetch all the available APIs

Actual Behavior

Fetching only 500 APIs

Possible Fix

Please update it to fetch all the records.

Steps to Reproduce

Your Environment

  • Zappa version used:
  • Operating System and Python version:
  • The output of pip freeze:
  • Link to your project (optional):
  • Your zappa_settings.json:
@javulticat
Copy link
Member

javulticat commented Nov 11, 2023

I think you could possibly be getting mixed up between AWS's regional account limits and their client API response size limits. The docs you linked do indeed say that an AWS account can have up to 600 regional APIs set up via API Gateway, per AWS region.

However, when calling the ._get_rest_apis() method from the boto3 library like we are doing in the places you referenced in the Zappa codebase, the boto3 documentation clearly states that a maximum limit of 500 APIs can be returned per each method call of ._get_rest_apis(). So, regardless of how many APIs AWS allows its users to have on their accounts, they still limit their client API to only be able to fetch data on up to 500 AWS APIs per request.

Thus, I'm going to close this, as there is nothing worthwhile we can really do about a hard limit AWS has set in their client API for this specific endpoint where we are already using the maximum limit. If all we had to do was replace the integer 500 with 600, that would be one thing, but it would be a waste of both our time and Zappa's runtime to have to implement something like pagination logic in this instance when the chance that any Zappa user would actually ever make use of that logic because they are hosting more than 500 APIs on AWS with API Gateway (and, not to mention, it would be prohibitively expensive to afford to host that many APIs on AWS even if they wanted to for some reason)... is effectively zero.

@javulticat javulticat closed this as not planned Won't fix, can't repro, duplicate, stale Nov 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working next-release-candidate
Projects
None yet
Development

No branches or pull requests

3 participants