In the old interface, connection pooling was tied to an endpoint object. In the new client interface, connection pooling is tied to the client instance.
To reuse existing HTTP connections and improve performance, use a single client instance for multiple API calls instead of creating new clients for every request.
# Using the same client will reuse any existing HTTP
# connections the client was using.
s3 = session.get_client('s3', 'us-west-2')
for obj in s3.list_objects(Bucket='amzn-s3-demo-bucket')['Contents']:
name = obj['Key']
print(s3.head_object(Bucket='amzn-s3-demo-bucket', Key=name))