lundi 2 mars 2015

How to copy a file between s3 buckets using python boto library

I try to copy a file (key in boto nomenclature) from bucket A to bucket B in the same account. This is a big file (over 100GB). What method should I use?


After running Key.copy() I got:



S3ResponseError: S3ResponseError: 400 Bad Request InvalidRequestThe specified copy source is larger than the maximum allowable size for a copy source: 53687091201B2817C3CF85C4F86cpq+ns1emE6e7UJXZASKKTHvX+jrBjPCUyI/nbHowTv1qT2zsWVtq1sVRCprddXZ/mhFJQAEWE=



I don't see any method similar to mulipart upload.


The sample code:



import boto
conn = boto.connect_s3()
bucket = conn.get_bucket('A')
s3file = bucket.get_key('big_file')
s3file.copy('B', 'new_big_file')




Aucun commentaire:

Enregistrer un commentaire