Copy files from one S3 bucket to another S3 bucket on same account

  1. Create a new S3 bucket testbucketbkp1.
  2. Create a new S3 bucket testbucketbkp2.
  3. Upload a test file to testbucketbkp1.
  4. Now install the AWS CLI on PC.
  5. Type aws configure

Enter the access key ID and secret access

6. Copy the objects between the source and target buckets using sync command

aws s3 sync s3://testbucketbkp1 s3://testbucketbkp2

8. The sync command uses the CopyObject APIs to copy objects between S3 buckets.