How can I test the upload speed of Amazon S3 Transfer Acceleration for a specific file size?
Last updated: 2021-10-11
I want to use S3 Transfer Acceleration to improve the file upload speed to my Amazon Simple Storage Service (Amazon S3) bucket. I also want to compare the speeds between uploading directly to the S3 bucket and using S3 Transfer Acceleration. How can I do that?
To compare the general upload speed across Amazon S3 Regions, you can use the Amazon S3 Transfer Acceleration Speed Comparison tool. To test the upload speed of a specific file size, use the test-upload.sh from the Amazon Web Services - Labs GitHub website.
Before you run test-upload.sh, the following requirements must be met:
1. Review your AWS Identity and Access Management (IAM) user credentials to be sure that you have the permissions to enable Transfer Acceleration. You need the s3:PutAccelerateConfiguration permission to enable or disable Transfer Acceleration. Additionally, you need the s3:GetAccelerateConfiguration permission to view whether a bucket has Transfer Acceleration enabled. For more information, see Requirements for using Amazon S3 Transfer Acceleration.
2. Enable Transfer Acceleration on your S3 bucket.
Note: If you receive errors when running AWS CLI commands, make sure that you’re using the most recent AWS CLI version.
Requirements for test-upload.sh
Before you run test-upload.sh, you must first install the bc language on your Linux machine. Run this command to install bc on an Ubuntu or Debian machine:
apt-get install bc
Run this command to install bc on an Amazon Linux, CentOS, RHEL, or Fedora machine:
yum install bc
Requirements for test-upload.sh on a macOS machine
Before you run test-upload.sh, you must first install coreutils on your macOS machine using Homebrew. Follow these steps:
1. (Optional) If you don't have Homebrew installed, then follow the installation instructions on the Homebrew website.
2. Run this command to install coreutils using Homebrew:
brew install coreutils