S3.Client.
copy
(CopySource, Bucket, Key, ExtraArgs=None, Callback=None, SourceClient=None, Config=None)¶Copy an object from one S3 location to another.
This is a managed transfer which will perform a multipart copy in multiple threads if necessary.
Usage:
import boto3
s3 = boto3.resource('s3')
copy_source = {
'Bucket': 'mybucket',
'Key': 'mykey'
}
s3.meta.client.copy(copy_source, 'otherbucket', 'otherkey')
{'Bucket': 'bucket', 'Key': 'key', 'VersionId': 'id'}
. Note
that the VersionId
key is optional and may be omitted.