Collections - Boto3 1.34.74 documentation

Collections automatically handle paging through results, but you may want to control the number of items returned from a single service operation call. You can do so using the page_size() method: By default, S3 will return 1000 objects at a time, so the above code would let you process the items in smaller batches, which

Controlling page size

Collections automatically handle paging through results, but you may want to control the number of items returned from a single service operation call. You can do so using the page_size() method:

# S3 iterate over all objects 100 at a time for obj in bucket.objects.page_size(100): print(obj.key) 

By default, S3 will return 1000 objects at a time, so the above code would let you process the items in smaller batches, which could be beneficial for slow or unreliable internet connections.

ncG1vNJzZmian6m8dHrAppizp56WxLR6wqikaK5hZLGwr9SmnKeskam2sLqOmqeiZ5yWwaa%2F02ierqGUmnyku8ulnJysmaS7tHrHraSl

 Share!