0

I am instantiating s3 resource with boto3. I have question specifically on connect_timeout, read_timeout, max_attempts. I have two set of operations - I/O and non-I/O. On the same s3 resource depending on I/O or non I/O operation how do I change these options?

If this is not possible, I am thinking to instantiate two s3 resources - one for I/O and another for non I/O - Is there any better option than this?

The reason behind this - max_attempts:7 - is taking some times longer due to exponential backoff timer - that is OK for I/O ops, but not acceptable for non I/O ops.

s3Resource = boto3.resource('s3’, use_ssl=False, endpoint_url=<>, ,aws_access_key_id=<>,
    aws_secret_access_key=<>, config=Config(signature_version='s3v4',
    connect_timeout=5, read_timeout=5, retries={'max_attempts': 7})
    )

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.