title: Can we copy the files and and place on root of s3 bucket using boto3 and python
body: <p>I need to copy file from from one folder to root of the s3 bucket. Is there a common method where  I can give empty destination key. Or should I follow copy and delete approach as below:</p>
  <pre><code>import boto3
  s3_resource = boto3.resource(‘s3’)
  # Copy object A as object B
  s3_resource.Object(“bucket_name”, “newpath/to/object_B.txt”).copy_from(
   CopySource=”path/to/your/object_A.txt”)
  # Delete the former object A
  s3_resource.Object(“bucket_name”, “path/to/your/object_A.txt”).delete()
  </code></pre>