milind potdar
milind potdar

Reputation: 21

boto3 - "errorMessage": "copy_object() only accepts keyword arguments."

CopySource = {
'Bucket': file.bucket_name, 
'Key': file.key
}
Bucket = project_bucket
Key = file.key
s3_client.copy_object(Bucket,Key,CopySource)

trying to copy object from one directory of s3 bucket to another s3 with same directory structure

Upvotes: 1

Views: 1646

Answers (1)

Marcin
Marcin

Reputation: 238199

As explained in the docs, it should be:

s3_client.copy_object(Bucket=project_bucket,Key=file.key,CopySource)

Upvotes: 2

Related Questions