PutBucketRequestPayment - Amazon Simple Storage Service


Sets the request payment configuration for a bucket. By default, the bucket owner pays for downloads from the bucket. This configuration parameter enables the bucket owner (only) to specify that the person requesting the download will be charged for the download. For more information, see Requester Pays Buckets.

The following operations are related to PutBucketRequestPayment:

Request Syntax

PUT /?requestPayment HTTP/1.1 Host: Bucket.s3.amazonaws.com Content-MD5: ContentMD5 x-amz-expected-bucket-owner: ExpectedBucketOwner <?xml version="1.0" encoding="UTF-8"?> <RequestPaymentConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> <Payer>string</Payer> </RequestPaymentConfiguration>

URI Request Parameters

The request uses the following URI parameters.


The bucket name.

Required: Yes


The base64-encoded 128-bit MD5 digest of the data. You must use this header as a message integrity check to verify that the request body was not corrupted in transit. For more information, see RFC 1864.

For requests made using the AWS Command Line Interface (CLI) or AWS SDKs, this field is calculated automatically.


The account ID of the expected bucket owner. If the bucket is owned by a different account, the request will fail with an HTTP 403 (Access Denied) error.

Request Body

The request accepts the following data in XML format.


Root level tag for the RequestPaymentConfiguration parameters.

Required: Yes


Specifies who pays for the download and request fees.

Type: String

Valid Values: Requester | BucketOwner

Required: Yes

Response Syntax

HTTP/1.1 200

Response Elements

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.


Sample Request

This request creates a Requester Pays bucket named colorpictures.

PUT ?requestPayment HTTP/1.1 Host: colorpictures.s3.<Region>.amazonaws.com Content-Length: 173 Date: Wed, 01 Mar 2006 12:00:00 GMT Authorization: authorization string <RequestPaymentConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> <Payer>Requester</Payer> </RequestPaymentConfiguration>

Sample Response

Delete the metric configuration with a specified ID, which disables theCloudWatch metrics with the ExampleMetrics value for the FilterId dimension.

HTTP/1.1 200 OK x-amz-id-2: YgIPIfBiKa2bj0KMg95r/0zo3emzU4dzsD4rcKCHQUAdQkf3ShJTOOpXUueF6QKo x-amz-request-id: 236A8905248E5A01 Date: Wed, 01 Mar 2006 12:00:00 GMT Location: /colorpictures Content-Length: 0 Connection: close Server: AmazonS3

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: