time (aws s3 cp s3://$bucket/upload1.test 5GB.file; aws s3 cp 5GB.file s3://$bucket/copy/5GB.file)

time aws s3api copy-object --copy-source $bucket/upload1.test --bucket $bucket --key copy/5GB-2.file

time aws s3 cp s3://$bucket/upload1.test s3://$bucket/copy/5GB-3.file

Access S3


The first command is needed to GET the data from S3 back to the EC2 instance and then PUT the data back to S3 from the EC2 instance. The second command uses PUT COPY but is single-threaded. The third command also uses PUT COPY but also uses Transfer Manager, which is multithreaded depending on the AWS CLI configuration. Both the second and third instructions perform replication between S3 locations inside S3. This results in only API calls being made from the EC2 server and the data transfer bandwidth being made only inside S3.