Using Requester Pays buckets for storage transfers and usage - Amazon Simple Storage Service
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Using Requester Pays buckets for storage transfers and usage

In general, bucket owners pay for all Amazon S3 storage and data transfer costs that are associated with their bucket. However, you can configure a bucket to be a Requester Pays bucket. With Requester Pays buckets, the requester instead of the bucket owner pays the cost of the request and the data download from the bucket. The bucket owner always pays the cost of storing data.

Typically, you configure buckets to be Requester Pays buckets when you want to share data but not incur charges associated with others accessing the data. For example, you might use Requester Pays buckets when making available large datasets, such as zip code directories, reference data, geospatial information, or web crawling data.

Important

If you enable Requester Pays on a bucket, anonymous access to that bucket is not allowed.

You must authenticate all requests involving Requester Pays buckets. The request authentication enables Amazon S3 to identify and charge the requester for their use of the Requester Pays bucket.

When the requester assumes an Amazon Identity and Access Management (IAM) role before making their request, the account to which the role belongs is charged for the request. For more information about IAM roles, see IAM roles in the IAM User Guide.

After you configure a bucket to be a Requester Pays bucket, requesters must show they understand that they will be charged for the request and for the data download. To show they accept the charges, requesters must either include x-amz-request-payer as a header in their API request for DELETE, GET, HEAD, POST, and PUT requests, or add the RequestPayer parameter in their REST request. For CLI requests, requesters can use the --request-payer parameter.

Example – Using Requester Pays when deleting an object

To use the following DeleteObjectVersion API example, replace the user input placeholders with your own information.

DELETE /Key+?versionId=VersionId HTTP/1.1 Host: Bucket.s3.amazonaws.com x-amz-mfa: MFA x-amz-request-payer: RequestPayer x-amz-bypass-governance-retention: BypassGovernanceRetention x-amz-expected-bucket-owner: ExpectedBucketOwner

If the requester restores objects by using the RestoreObject API, Requester Pays is supported as long as the x-amz-request-payer header or the RequestPayer parameter are in the request; however, the requester only pays for the cost of the request. The bucket owner pays the retrieval charges.

Requester Pays buckets do not support the following:

  • Anonymous requests

  • SOAP requests

  • Using a Requester Pays bucket as the target bucket for end-user logging, or vice versa. However, you can turn on end-user logging on a Requester Pays bucket where the target bucket is not a Requester Pays bucket.

How Requester Pays charges work

The charge for successful Requester Pays requests is straightforward: The requester pays for the data transfer and the request, and the bucket owner pays for the data storage. However, the bucket owner is charged for the request under the following conditions:

  • The request returns an AccessDenied (HTTP 403 Forbidden) error and the request is initiated inside the bucket owner's individual Amazon account or Amazon organization.

  • The request is a SOAP request.

For more information about Requester Pays, see the following topics.