S3 Bucket Copy from one bucket to another

We can copy content of one bucket to another by following:

1. AWS Console
– Login to AWS Console
– Go to https://s3.console.aws.amazon.com/s3/buckets/
– Enter into source bucket
– select directory to be copied
– select “Copy” from “More” option
– select destination bucket
– select “Paste” option from “More” to destination directory. (Paste option can take some time to activate.)
2. AWS CLI
Setup AWS Cli
sudo apt-get install awscli
aws configure
– Enter AccessKey
– Enter SecretKey
– Enter AWS DEFAULT REGION
– Enter Out Format

Command to copy files:

s3 sync s3://sourcebucket/directory/ s3://destinationbucket/directory --exclude *.tmp