Common Request Headers

Amazon S3 REST requests include headers that contain basic information about the request. The following table describes headers that can be used by all Amazon S3 REST requests.

Header NameDescriptionRequired
Authorization

The information required for request authentication.

Type: String

Default: None

Yes
Content-Length

Length of the message (without the headers) according to RFC 2616.

Type: String

Default: None

Condition: Required for PUTs and operations that load XML, such as logging and ACLs.

Conditional
Content-Type

The content type of the resource. Example: text/plain

Type: String

Default: None

No
Date

The current date and time according to the requester. Example: Wed, 01 Mar 2009 12:00:00 GMT

Type: String

Default: None

Yes
Host

For path-style requests, the value is s3.amazonaws.com. For virtual-style requests, the value is BucketName.s3.amazonaws.com. For more information, go to Virtual Hosting in the Amazon Simple Storage Service Developer Guide .

Type: String

Default: None

Condition: Required for HTTP 1.1 (most toolkits add this header automatically); optional for HTTP/1.0 requests.

Conditional
x-amz-security-token

The security tokens for operations that use Amazon DevPay. Each request that uses Amazon DevPay requires two x-amz-security-token headers: one for the product token and one for the user token.

When Amazon S3 receives an authenticated request, it compares the computed signature with the provided signature. Improperly formatted multi-value headers used to calculate a signature can cause authentication issues.

Type: String

Default: None

Condition: Required for requests that use Amazon DevPay.

Conditional