In the previous version of AWS SDK there were many handy functions like getDescribeInstancesIterator
which would return an array iterator for results (in this case an array of instances matching the filters).
This function (and similar) have been removed in the new AWS SDK. After some research I can find instead is a getIterator($name, array $args = [])
function defined as an AwsClientTrait
.
I'm unsure how I can use this new getIterator
function to replace the getDescribeInstancesIterator
function, i.e. to get an Array iterator for describeInstances
function that returns list of matching instances like before (without having to worry about pagination, etc)?
Any code sample would be extremely useful.