Copy an object from one S3 location to another

Copy an object from one S3 location to another using Boto3

0

Votes

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

Vote Here

You must earn at least 1 vote on your snippets to be allowed to vote

Terms Of Use

Privacy Policy

Featured snippets are MIT license

Gears & Masters

Advertise

DevOpsnipp.com © 2020

medium.png