Script to Move files between two AWS folders using boto3

  • Post author:
  • Post category:Python

script to move files between different folders in s3 using Python and boto3

import boto3
s3 = boto3.resource('s3')
copy_source = {
    'Bucket': 'mybucket',
    'Key': 'mykey'
}
s3.meta.client.copy(copy_source, 'otherbucket', 'otherkey')