Description of changes:
Existing script is expecting that list-functions cli will return all functions under the account. However, the cli may perform return partial results and include a NextToken to retrieve the next set of functions. This means that users may not be finding all functions and function versions when trying to identify whether an ENI is still in use.
This change pulls out the NextToken from the response and makes paginated calls until no valid NextToken is returned.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Issue #, if available: N/A
Description of changes: Existing script is expecting that list-functions cli will return all functions under the account. However, the cli may perform return partial results and include a NextToken to retrieve the next set of functions. This means that users may not be finding all functions and function versions when trying to identify whether an ENI is still in use.
This change pulls out the NextToken from the response and makes paginated calls until no valid NextToken is returned.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.