- Newest
- Most votes
- Most comments
When you are using search-transit-gateway-routes the max amount of results you can get is 1000. 1000 is also the limit for --max-results argument for the API call. The pagination does not work with this API as it is not returning pagination token. If the response contains more than 1000 routes or over the max results you specified, it will state AdditionalResultsAvailable is true.
This behaviour is the same for AWS CLI, Console and SDKs as they are using the same API.
Maximum routes possible in the transit gateway route table are 10,000 (https://www.amazonaws.cn/en/transit-gateway/faqs/). Even if the max-results or --no-pagination not set, is it possible to return those many number of routes in one api call?
Updated my answer with new information.
Thanks for the clarification. Is there any way available to fetch all the routes of the transit gateway route table if the # of routes are more than 1000?
You can now export the TGW route table to S3 in JSON format and the work through your search as well. https://docs.aws.amazon.com/vpc/latest/tgw/tgw-route-tables.html#tgw-export-route-tables
Relevant content
- Accepted Answerasked 6 months ago
- AWS OFFICIALUpdated 20 days ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
You are referring to V1 documentation of the CLI, are using V1 of the CLI or V2 which is the latest? It has up to date documentation located at: https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/search-transit-gateway-routes.html