When i am trying to copy video objects(9GB .mp4 files) between buckets within same vpc of AWS, keep getting operation timed out after 10.02 seconds. My lambda function doesnt have a timeout specified , looks like this may be happening internally in the copy operation of s3
Here is the code from how to copy s3 object from one bucket to another using python boto3 i am using
import boto3
s3 = boto3.resource('s3')
copy_source = {
'Bucket': 'mybucket',
'Key': 'mykey'
}
final_bucket = s3.Bucket('otherbucket')
final_bucket.copy(copy_source, 'otherkey')
I tried using the following but this may not work, can any one have some idea please let me know
config = Config(connect_timeout=5, retries={'max_attempts': 2})
final_bucket = s3.Bucket('finalbucketname')
final_bucket.copy(copy_source, 'otherbucket',config=config)
Encountered a copy exception: __init__() got an unexpected keyword argument 'connect_timeout'