Boto3 - AWS Appflow - list_flows not returning specified maximum number of flows

46 Views Asked by At

The AWS Boto3 Appflow documentation for ListFlows has a parameter maxResults which states:

Specifies the maximum number of items that should be returned in the result set. Valid Range: Minimum value of 1. Maximum value of 100.

I currently have 37 flows, all active, and the ListFlows command with the parameter maxResults set to 100 has always returned all 37 flows in the response, until today. Now, it only returns 35 flows and a nextToken pagination token for next page of data.

I have tried this with AWS CLI and got the same result. I tried to search the net for information as to what has changed and how the maxResults param should work but have not found anything useful.

Does anyone have any clues as to why I am not getting all 37 flows when the parameter maxResults is set to 100?

Many thanks.

2

There are 2 best solutions below

0
boringDeveloper On BEST ANSWER

@rlhagerm Unfortunately, it seems like list_flows is not supported yet: OperationNotPageableError: Operation cannot be paginated: list_flows

However, I found this question dealing with the similar issue which has helped solve the issue.

1
rlhagerm On

You have some options for paginating results with AWS Boto3 clients, see this page that might be helpful. Have you checked the PageSize? Be aware that some services have a max page size set that you cannot go over. Even if you aren't able to use a paginator, it could still be a page size issue in the list call.