I’d say if the inversed boolean condition results in the infinite loop, there are indeed more issues with this code.
Either the boolean condition is required and both inputs should be handled.
Or the boolean condition should be somewhat else.
Tertium non datur.
Make sure you pass your feedback along to the AWS SDK team. They are the ones who designed the workflow for the ssm:GetParametersByPath API. It requires checking for the presence of NextToken to know whether you got all the parameters or you need to send a request for more. Out of curiousity how would you design paging functionality to avoid the boolean check?
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.