Copy files from one Amazon S3 bucket to another

Amazon S3 is a cheap object storage service from Amazon AWS. You can use aws-cli to copy files between S3 buckets. To install aws-cli, check post How to Install Amazon AWS awscli.

To copy files from one Amazon S3 bucket to another, you can use the command

aws s3 sync "s3://source-bucket-name/" "s3://destination-bucket-name/"

If you only need to copy a folder in the bucket to another, use

aws s3 sync "s3://source-bucket-name/folder_name/" "s3://destination-bucket-name/folder_name/"

if you only need to copy a file, you can use

aws s3 cp "s3://source-bucket-name/filename.extn" "s3://destination-bucket-name/"

See Amazon S3

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *