0
0
AwsHow-ToBeginner · 3 min read

How to Use S3 Transfer Acceleration for Faster Uploads

To use S3 Transfer Acceleration, first enable it on your S3 bucket in the AWS Management Console or via AWS CLI. Then, upload files using the special accelerated endpoint bucketname.s3-accelerate.amazonaws.com to speed up transfers over long distances.
📐

Syntax

Enable transfer acceleration on your bucket and use the accelerated endpoint for uploads.

  • Enable acceleration: Turn on transfer acceleration on your S3 bucket.
  • Accelerated endpoint: Use bucketname.s3-accelerate.amazonaws.com instead of the regular endpoint.
  • Upload command: Use AWS CLI or SDKs with the accelerated endpoint.
bash
aws s3api put-bucket-accelerate-configuration --bucket your-bucket-name --accelerate-configuration Status=Enabled
💻

Example

This example shows how to enable transfer acceleration on a bucket and upload a file using AWS CLI with the accelerated endpoint.

bash
aws s3api put-bucket-accelerate-configuration --bucket example-bucket --accelerate-configuration Status=Enabled

aws s3 cp ./localfile.txt s3://example-bucket/ --endpoint-url https://s3-accelerate.amazonaws.com
Output
upload: ./localfile.txt to s3://example-bucket/localfile.txt
⚠️

Common Pitfalls

  • Not enabling transfer acceleration on the bucket before using the accelerated endpoint causes errors.
  • Using the normal S3 endpoint URL instead of the accelerated endpoint URL will not speed up transfers.
  • Transfer acceleration may not improve speed for small files or transfers within the same region.
  • Some regions or buckets may not support transfer acceleration.
bash
## Wrong: Upload without enabling acceleration
aws s3 cp ./file.txt s3://example-bucket/ --endpoint-url https://s3-accelerate.amazonaws.com

## Right: Enable acceleration first
aws s3api put-bucket-accelerate-configuration --bucket example-bucket --accelerate-configuration Status=Enabled
aws s3 cp ./file.txt s3://example-bucket/ --endpoint-url https://s3-accelerate.amazonaws.com
📊

Quick Reference

  • Enable transfer acceleration on your bucket before use.
  • Use the accelerated endpoint bucketname.s3-accelerate.amazonaws.com.
  • Works best for large files and long-distance transfers.
  • Check transfer acceleration status with get-bucket-accelerate-configuration.

Key Takeaways

Always enable transfer acceleration on your S3 bucket before using it.
Use the special accelerated endpoint URL to benefit from faster transfers.
Transfer acceleration is most effective for large files and global transfers.
Check your bucket's acceleration status to avoid errors.
Not all buckets or regions support transfer acceleration.