Menu
Amazon CloudFront
API Reference (API Version 2016-09-07)

Common REST Headers

This section lists the common HTTP headers that CloudFront uses in REST requests.

Request Headers

Header NameDescriptionRequired

Authorization

The information required for request authentication. For more information, see Authenticating REST Requests.

Yes

Content-Length

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

Condition: Required if the request body itself contains information (most toolkits add this header automatically).

Conditional

Content-Type

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

Condition: Required for POST and PUT requests.

Conditional

Date

The date used to create the signature contained in the Authorization header. The format must be one of the full date formats specified in RFC 2616 section 3.1.1. For example: Wed, 05 Apr 2006 21:12:00 GMT. For more information, go to the RFC 2616 specification.

Condition: Required unless you provide the x-amz-date header. For more information about the request time stamp, REST Requests.

Conditional

Host

The host being requested. The value must be cloudfront.amazonaws.com

Condition: Required for HTTP 1.1 (most toolkits add this header automatically)

Conditional

x-amz-date

The date used to create the signature contained in the Authorization header. The format must be one of the full date formats specified in RFC 2616 section 3.1.1, for example, Wed, 05 Apr 2006 21:12:00 GMT. For more information, go to the RFC 2616 specification.

Condition: Required if you do not provide the Date header. For more information, see REST Requests.

Conditional

Request ID Response Header

Each response contains a request ID that you can use if you need to troubleshoot a request with AWS. The ID is contained in an HTTP header called x-amz-request-id. An example of a request ID is 647cd254-e0d1-44a9-af61-1d6d86ea6b77.