

# Configuring fast, secure file transfers using Amazon S3 Transfer Acceleration
<a name="transfer-acceleration"></a>

Amazon S3 Transfer Acceleration is a bucket-level feature that enables fast, easy, and secure transfers of files over long distances between your client and an S3 general purpose bucket. Transfer Acceleration is designed to optimize transfer speeds from across the world into S3 general purpose buckets. Transfer Acceleration takes advantage of the globally distributed edge locations in Amazon CloudFront. As the data arrives at an edge location, the data is routed to Amazon S3 over an optimized network path.

When you use Transfer Acceleration, additional data transfer charges might apply. For more information about pricing, see [Amazon S3 pricing](https://aws.amazon.com/s3/pricing/).

## Why use Transfer Acceleration?
<a name="transfer-acceleration-why-use"></a>

You might want to use Transfer Acceleration on a general purpose bucket for various reasons:
+ Your customers upload to a centralized general purpose bucket from all over the world.
+ You transfer gigabytes to terabytes of data on a regular basis across continents.
+ You can't use all of your available bandwidth over the internet when uploading to Amazon S3.

For more information about when to use Transfer Acceleration, see [Amazon S3 FAQs](https://aws.amazon.com/s3/faqs/#s3ta).

## Requirements for using Transfer Acceleration
<a name="transfer-acceleration-requirements"></a>

The following are required when you are using Transfer Acceleration on an S3 bucket:
+ Transfer Acceleration is only supported on virtual-hosted style requests. For more information about virtual-hosted style requests, see [Making requests using the REST API ](https://docs.aws.amazon.com/AmazonS3/latest/API/RESTAPI.html) in the *Amazon S3 API Reference*. 
+ The name of the bucket used for Transfer Acceleration must be DNS-compliant and must not contain periods (".").
+ Transfer Acceleration must be enabled on the bucket. For more information, see [Enabling and using S3 Transfer Acceleration](transfer-acceleration-examples.md). 

  After you enable Transfer Acceleration on a bucket, it might take up to 20 minutes before the data transfer speed to the bucket increases.
**Note**  
Transfer Acceleration is currently supported for buckets located in the following Regions:  
Asia Pacific (Tokyo) (ap-northeast-1)
Asia Pacific (Seoul) (ap-northeast-2)
Asia Pacific (Mumbai) (ap-south-1)
Asia Pacific (Singapore) (ap-southeast-1)
Asia Pacific (Sydney) (ap-southeast-2)
Canada (Central) (ca-central-1)
Europe (Frankfurt) (eu-central-1)
Europe (Ireland) (eu-west-1)
Europe (London) (eu-west-2)
Europe (Paris) (eu-west-3)
South America (São Paulo) (sa-east-1)
US East (N. Virginia) (us-east-1)
US East (Ohio) (us-east-2)
US West (N. California) (us-west-1)
US West (Oregon) (us-west-2)
+ To access the bucket that is enabled for Transfer Acceleration, you must use the endpoint `bucket-name.s3-accelerate.amazonaws.com`. Or, use the dual-stack endpoint `bucket-name.s3-accelerate.dualstack.amazonaws.com` to connect to the enabled bucket over IPv6. You can continue to use the regular endpoints for standard data transfer.
+ You must be the bucket owner to set the transfer acceleration state. The bucket owner can assign permissions to other users to allow them to set the acceleration state on a bucket. The `s3:PutAccelerateConfiguration` permission permits users to enable or disable Transfer Acceleration on a bucket. The `s3:GetAccelerateConfiguration` permission permits users to return the Transfer Acceleration state of a bucket, which is either `Enabled` or `Suspended.` 

The following sections describe how to get started and use Amazon S3 Transfer Acceleration for transferring data.

**Topics**
+ [

## Why use Transfer Acceleration?
](#transfer-acceleration-why-use)
+ [

## Requirements for using Transfer Acceleration
](#transfer-acceleration-requirements)
+ [

# Getting started with Amazon S3 Transfer Acceleration
](transfer-acceleration-getting-started.md)
+ [

# Enabling and using S3 Transfer Acceleration
](transfer-acceleration-examples.md)
+ [

# Using the Amazon S3 Transfer Acceleration Speed Comparison tool
](transfer-acceleration-speed-comparison.md)

# Getting started with Amazon S3 Transfer Acceleration
<a name="transfer-acceleration-getting-started"></a>

You can use Amazon S3 Transfer Acceleration for fast, easy, and secure transfers of files over long distances between your client and an S3 bucket. Transfer Acceleration uses the globally distributed edge locations in Amazon CloudFront. As the data arrives at an edge location, data is routed to Amazon S3 over an optimized network path.

To get started using Amazon S3 Transfer Acceleration, perform the following steps:

1. **Enable Transfer Acceleration on a bucket** 

   

   You can enable Transfer Acceleration on a bucket any of the following ways:
   + Use the Amazon S3 console. 
   + Use the REST API [https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTaccelerate.html](https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTaccelerate.html) operation.
   + Use the AWS CLI and AWS SDKs. For more information, see [Developing with Amazon S3 using the AWS SDKs](https://docs.aws.amazon.com/AmazonS3/latest/API/sdk-general-information-section.html) in the *Amazon S3 API Reference*. 

   For more information, see [Enabling and using S3 Transfer Acceleration](transfer-acceleration-examples.md).
**Note**  
For your bucket to work with transfer acceleration, the bucket name must conform to DNS naming requirements and must not contain periods (`.`). 

1. **Transfer data to and from the acceleration-enabled bucket**

   Use one of the following `s3-accelerate` endpoint domain names:
   + To access an acceleration-enabled bucket, use `bucket-name.s3-accelerate.amazonaws.com`. 
   + To access an acceleration-enabled bucket over IPv6, use `bucket-name.s3-accelerate.dualstack.amazonaws.com`. 

     Amazon S3 dual-stack endpoints support requests to S3 buckets over IPv6 and IPv4. The Transfer Acceleration dual-stack endpoint only uses the virtual hosted-style type of endpoint name. For more information, see [Making requests to Amazon S3 over IPv6 ](https://docs.aws.amazon.com/AmazonS3/latest/API/ipv6-access.html) in the *Amazon S3 API Reference* and [Using Amazon S3 dual-stack endpoints ](https://docs.aws.amazon.com/AmazonS3/latest/API/dual-stack-endpoints.html) in the *Amazon S3 API Reference*.
**Note**  
Your data transfer application must use one of the following two types of endpoints to access the bucket for faster data transfer: `.s3-accelerate.amazonaws.com` or `.s3-accelerate.dualstack.amazonaws.com` for the dual-stack endpoint. If you want to use standard data transfer, you can continue to use the regular endpoints.

   You can point your Amazon S3 `PUT` object and `GET` object requests to the `s3-accelerate` endpoint domain name after you enable Transfer Acceleration. For example, suppose that you currently have a REST API application using [https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPUT.html](https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPUT.html) that uses the hostname `amzn-s3-demo-bucket.s3.us-east-1.amazonaws.com` in the `PUT` request. To accelerate the `PUT`, you change the hostname in your request to `amzn-s3-demo-bucket.s3-accelerate.amazonaws.com`. To go back to using the standard upload speed, change the name back to `amzn-s3-demo-bucket.s3.us-east-1.amazonaws.com`.

   After Transfer Acceleration is enabled, it can take up to 20 minutes for you to realize the performance benefit. However, the accelerate endpoint is available as soon as you enable Transfer Acceleration.

   You can use the accelerate endpoint in the AWS CLI, AWS SDKs, and other tools that transfer data to and from Amazon S3. If you are using the AWS SDKs, some of the supported languages use an accelerate endpoint client configuration flag so you don't need to explicitly set the endpoint for Transfer Acceleration to `bucket-name.s3-accelerate.amazonaws.com`. For examples of how to use an accelerate endpoint client configuration flag, see [Enabling and using S3 Transfer Acceleration](transfer-acceleration-examples.md).

You can use all Amazon S3 operations through the transfer acceleration endpoints *except* for the following: 
+ [https://docs.aws.amazon.com/AmazonS3/latest/API/RESTServiceGET.html](https://docs.aws.amazon.com/AmazonS3/latest/API/RESTServiceGET.html)
+ [https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUT.html](https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUT.html)
+ [https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketDELETE.html](https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketDELETE.html)

Also, Amazon S3 Transfer Acceleration does not support cross-Region copies using [https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectCOPY.html](https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectCOPY.html). 

# Enabling and using S3 Transfer Acceleration
<a name="transfer-acceleration-examples"></a>

You can use Amazon S3 Transfer Acceleration to transfer files quickly and securely over long distances between your client and an S3 general purpose bucket. You can enable Transfer Acceleration using the S3 console, the AWS Command Line Interface (AWS CLI), API, or the AWS SDKs.

This section provides examples of how to enable Amazon S3 Transfer Acceleration on a bucket and use the acceleration endpoint for the enabled bucket. 

For more information about Transfer Acceleration requirements, see [Configuring fast, secure file transfers using Amazon S3 Transfer Acceleration](transfer-acceleration.md).

## Using the S3 console
<a name="enable-transfer-acceleration"></a>

**Note**  
If you want to compare accelerated and non-accelerated upload speeds, open the [ Amazon S3 Transfer Acceleration Speed Comparison tool](https://s3-accelerate-speedtest.s3-accelerate.amazonaws.com/en/accelerate-speed-comparsion.html).  
The Speed Comparison tool uses multipart upload to transfer a file from your browser to various AWS Regions with and without Amazon S3 transfer acceleration. You can compare the upload speed for direct uploads and transfer accelerated uploads by Region. 

**To enable transfer acceleration for an S3 general purpose bucket**

1. Sign in to the AWS Management Console and open the Amazon S3 console at [https://console.aws.amazon.com/s3/](https://console.aws.amazon.com/s3/).

1. In the left navigation pane, choose **General purpose buckets**.

1. In the **General purpose buckets** list, choose the name of the bucket that you want to enable transfer acceleration for.

1. Choose **Properties**.

1. Under **Transfer acceleration**, choose **Edit**.

1. Choose **Enable**, and choose **Save changes**.

**To access accelerated data transfers**

1. After Amazon S3 enables transfer acceleration for your bucket, view the **Properties** tab for the bucket.

1. Under **Transfer acceleration**, **Accelerated endpoint** displays the transfer acceleration endpoint for your bucket. Use this endpoint to access accelerated data transfers to and from your bucket. 

   If you suspend transfer acceleration, the accelerate endpoint no longer works.

## Using the AWS CLI
<a name="transfer-acceleration-examples-aws-cli"></a>

The following are examples of AWS CLI commands used for Transfer Acceleration. For instructions on setting up the AWS CLI, see [Developing with Amazon S3 using the AWS CLI](https://docs.aws.amazon.com/AmazonS3/latest/API/setup-aws-cli.html) in the *Amazon S3 API Reference*.

### Enabling Transfer Acceleration on a bucket
<a name="transfer-acceleration-examples-aws-cli-1"></a>

Use the AWS CLI [https://docs.aws.amazon.com/cli/latest/reference/s3api/put-bucket-accelerate-configuration.html](https://docs.aws.amazon.com/cli/latest/reference/s3api/put-bucket-accelerate-configuration.html) command to enable or suspend Transfer Acceleration on a bucket. 

The following example sets `Status=Enabled` to enable Transfer Acceleration on a bucket named `amzn-s3-demo-bucket`. To suspend Transfer Acceleration, use `Status=Suspended`.

**Example**  

```
$ aws s3api put-bucket-accelerate-configuration --bucket amzn-s3-demo-bucket --accelerate-configuration Status=Enabled
```

### Using Transfer Acceleration
<a name="transfer-acceleration-examples-aws-cli-2"></a>

You can direct all Amazon S3 requests made by `s3` and `s3api` AWS CLI commands to the accelerate endpoint: `s3-accelerate.amazonaws.com`. To do this, set the configuration value `use_accelerate_endpoint` to `true` in a profile in your AWS Config file. Transfer Acceleration must be enabled on your bucket to use the accelerate endpoint. 

All requests are sent using the virtual style of bucket addressing: `amzn-s3-demo-bucket.s3-accelerate.amazonaws.com`. Any `ListBuckets`, `CreateBucket`, and `DeleteBucket` requests are not sent to the accelerate endpoint because the endpoint doesn't support those operations. 

For more information about `use_accelerate_endpoint`, see [AWS CLI S3 Configuration](https://docs.aws.amazon.com/cli/latest/topic/s3-config.html) in the *AWS CLI Command Reference*.

The following example sets `use_accelerate_endpoint` to `true` in the default profile.

**Example**  

```
$ aws configure set default.s3.use_accelerate_endpoint true
```

If you want to use the accelerate endpoint for some AWS CLI commands but not others, you can use either one of the following two methods: 
+ Use the accelerate endpoint for any `s3` or `s3api` command by setting the `--endpoint-url` parameter to `https://s3-accelerate.amazonaws.com`.
+ Set up separate profiles in your AWS Config file. For example, create one profile that sets `use_accelerate_endpoint` to `true` and a profile that does not set `use_accelerate_endpoint`. When you run a command, specify which profile you want to use, depending upon whether you want to use the accelerate endpoint. 

### Uploading an object to a bucket enabled for Transfer Acceleration
<a name="transfer-acceleration-examples-aws-cli-3"></a>

The following example uploads a file to a bucket named `amzn-s3-demo-bucket` that's been enabled for Transfer Acceleration by using the default profile that has been configured to use the accelerate endpoint.

**Example**  

```
$ aws s3 cp file.txt s3://amzn-s3-demo-bucket/key-name --region region
```

The following example uploads a file to a bucket enabled for Transfer Acceleration by using the `--endpoint-url` parameter to specify the accelerate endpoint.

**Example**  

```
$ aws configure set s3.addressing_style virtual
$ aws s3 cp file.txt s3://amzn-s3-demo-bucket/key-name --region region --endpoint-url https://s3-accelerate.amazonaws.com
```

## Using the AWS SDKs
<a name="transfer-acceleration-examples-sdk"></a>

The following are examples of using Transfer Acceleration to upload objects to Amazon S3 using the AWS SDK. Some of the AWS SDK supported languages (for example, Java and .NET) use an accelerate endpoint client configuration flag so you don't need to explicitly set the endpoint for Transfer Acceleration to `bucket-name.s3-accelerate.amazonaws.com`.

------
#### [ Java ]

To use an accelerate endpoint to upload an object to Amazon S3 with the AWS SDK for Java, you can:
+ Create an S3Client that is configured to use accelerate endpoints. All buckets that the client accesses must have Transfer Acceleration enabled.
+ Enable Transfer Acceleration on a specified bucket. This step is necessary only if the bucket you specify doesn't already have Transfer Acceleration enabled.
+ Verify that transfer acceleration is enabled for the specified bucket.
+ Upload a new object to the specified bucket using the bucket's accelerate endpoint.

For more information about using Transfer Acceleration, see [Getting started with Amazon S3 Transfer Acceleration](transfer-acceleration-getting-started.md).

The following code example shows how to configure Transfer Acceleration with the AWS SDK for Java.

```
import software.amazon.awssdk.auth.credentials.ProfileCredentialsProvider;
import software.amazon.awssdk.core.sync.RequestBody;
import software.amazon.awssdk.regions.Region;
import software.amazon.awssdk.services.s3.S3Client;
import software.amazon.awssdk.services.s3.model.BucketAccelerateStatus;
import software.amazon.awssdk.services.s3.model.GetBucketAccelerateConfigurationRequest;
import software.amazon.awssdk.services.s3.model.PutBucketAccelerateConfigurationRequest;
import software.amazon.awssdk.services.s3.model.PutObjectRequest;
import software.amazon.awssdk.services.s3.model.AccelerateConfiguration;
import software.amazon.awssdk.services.s3.model.S3Exception;
import software.amazon.awssdk.core.exception.SdkClientException;

public class TransferAcceleration {
    public static void main(String[] args) {
        Region clientRegion = Region.US_EAST_1;
        String bucketName = "*** Provide bucket name ***";
        String keyName = "*** Provide key name ***";

        try {
            // Create an Amazon S3 client that is configured to use the accelerate endpoint.
            S3Client s3Client = S3Client.builder()
                    .region(clientRegion)
                    .credentialsProvider(ProfileCredentialsProvider.create())
                    .accelerate(true)
                    .build();

            // Enable Transfer Acceleration for the specified bucket.
            s3Client.putBucketAccelerateConfiguration(
                    PutBucketAccelerateConfigurationRequest.builder()
                            .bucket(bucketName)
                            .accelerateConfiguration(AccelerateConfiguration.builder()
                                    .status(BucketAccelerateStatus.ENABLED)
                                    .build())
                            .build());

            // Verify that transfer acceleration is enabled for the bucket.
            String accelerateStatus = s3Client.getBucketAccelerateConfiguration(
                    GetBucketAccelerateConfigurationRequest.builder()
                            .bucket(bucketName)
                            .build())
                    .status().toString();
            System.out.println("Bucket accelerate status: " + accelerateStatus);

            // Upload a new object using the accelerate endpoint.
            s3Client.putObject(PutObjectRequest.builder()
                            .bucket(bucketName)
                            .key(keyName)
                            .build(),
                    RequestBody.fromString("Test object for transfer acceleration"));
            System.out.println("Object \"" + keyName + "\" uploaded with transfer acceleration.");
        } catch (S3Exception e) {
            // The call was transmitted successfully, but Amazon S3 couldn't process
            // it, so it returned an error response.
            e.printStackTrace();
        } catch (SdkClientException e) {
            // Amazon S3 couldn't be contacted for a response, or the client
            // couldn't parse the response from Amazon S3.
            e.printStackTrace();
        }
    }
}
```

------
#### [ .NET ]

The following example shows how to use the AWS SDK for .NET to enable Transfer Acceleration on a bucket. For information about setting up and running the code examples, see [Getting Started with the AWS SDK for .NET](https://docs.aws.amazon.com/sdk-for-net/latest/developer-guide/net-dg-setup.html) in the *AWS SDK for .NET Developer Guide*. 

**Example**  

```
using Amazon;
using Amazon.S3;
using Amazon.S3.Model;
using System;
using System.Threading.Tasks;

namespace Amazon.DocSamples.S3
{
    class TransferAccelerationTest
    {
        private const string bucketName = "*** bucket name ***";
        // Specify your bucket region (an example region is shown).
        private static readonly RegionEndpoint bucketRegion = RegionEndpoint.USWest2;
        private static IAmazonS3 s3Client;
        public static void Main()
        {
            s3Client = new AmazonS3Client(bucketRegion);
            EnableAccelerationAsync().Wait();
        }

        static async Task EnableAccelerationAsync()
        {
                try
                {
                    var putRequest = new PutBucketAccelerateConfigurationRequest
                    {
                        BucketName = bucketName,
                        AccelerateConfiguration = new AccelerateConfiguration
                        {
                            Status = BucketAccelerateStatus.Enabled
                        }
                    };
                    await s3Client.PutBucketAccelerateConfigurationAsync(putRequest);

                    var getRequest = new GetBucketAccelerateConfigurationRequest
                    {
                        BucketName = bucketName
                    };
                    var response = await s3Client.GetBucketAccelerateConfigurationAsync(getRequest);

                    Console.WriteLine("Acceleration state = '{0}' ", response.Status);
                }
                catch (AmazonS3Exception amazonS3Exception)
                {
                    Console.WriteLine(
                        "Error occurred. Message:'{0}' when setting transfer acceleration",
                        amazonS3Exception.Message);
                }
        }
    }
}
```

When uploading an object to a bucket that has Transfer Acceleration enabled, you specify using the acceleration endpoint at the time of creating a client.



```
var client = new AmazonS3Client(new AmazonS3Config
            {
                RegionEndpoint = TestRegionEndpoint,
                UseAccelerateEndpoint = true
            }
```

------
#### [ JavaScript ]

For an example of enabling Transfer Acceleration by using the AWS SDK for JavaScript, see [PutBucketAccelerateConfiguration command](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/PutBucketAccelerateConfigurationCommand/) in the *AWS SDK for JavaScript API Reference*.

------
#### [ Python (Boto) ]

For an example of enabling Transfer Acceleration by using the SDK for Python, see [put\$1bucket\$1accelerate\$1configuration](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3.html#S3.Client.put_bucket_accelerate_configuration) in the *AWS SDK for Python (Boto3) API Reference*.

------
#### [ Other ]

For information about using other AWS SDKs, see [Sample Code and Libraries](https://aws.amazon.com/code/). 

------

## Using the REST API
<a name="transfer-acceleration-examples-api"></a>

Use the REST API `PutBucketAccelerateConfiguration` operation to enable accelerate configuration on an existing bucket. 

For more information, see [https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAccelerateConfiguration.html](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAccelerateConfiguration.html) in the *Amazon Simple Storage Service API Reference*.

# Using the Amazon S3 Transfer Acceleration Speed Comparison tool
<a name="transfer-acceleration-speed-comparison"></a>

You can use the [Amazon S3 Transfer Acceleration Speed Comparison tool](https://s3-accelerate-speedtest.s3-accelerate.amazonaws.com/en/accelerate-speed-comparsion.html) to compare accelerated and non-accelerated upload speeds across Amazon S3 Regions. The Speed Comparison tool uses multipart uploads to transfer a file from your browser to various Amazon S3 Regions with and without using Transfer Acceleration.

You can access the Speed Comparison tool by using either of the following methods:
+ Copy the following URL into your browser window, replacing `region` with the AWS Region that you are using (for example, `us-west-2`) and `amzn-s3-demo-bucket` with the name of the bucket that you want to evaluate: 

  `https://s3-accelerate-speedtest.s3-accelerate.amazonaws.com/en/accelerate-speed-comparsion.html?region=region&origBucketName=amzn-s3-demo-bucket` 

  For a list of the Regions supported by Amazon S3, see [Amazon S3 endpoints and quotas](https://docs.aws.amazon.com/general/latest/gr/s3.html) in the *AWS General Reference*.
+ Use the Amazon S3 console. 