Common REST Headers

SQS REST requests include headers which contain basic information about the request. The table below describes the required and optional headers for SQS REST requests.

Header NameDescriptionRequired

Authorization

The information required for request authentication. See About the Authorization Header for details about the format.

Yes

AWS-Version

The version of the SQS API. For example: 2007-05-01.

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-MD5

The base64 encoded 128-bit MD5 digest of the message (without the headers) according to RFC 1864. This header can be used as a message integrity check to verify that the decoded data is the same data that was originally sent. You want to use this header if you're interested in ensuring data integrity. Note that we ignore the MD5 for the purposes of our signature validation. See Authenticating REST Requests for more information about REST request authentication.

No

Content-Type

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

Yes

Date

The date used to create the signature contained in the Authorization header. Example: Wed, 05 Apr 2006 21:12:00 GMT

Yes

Host

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

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

Conditional

The authorization header is a string that follows this format:

AWS <AWSAccessKeyId>:<Signature>

Note that there is a space after "AWS".

[Important]Important

Notice that there is no new line at the end of the string. This is a common mistake that causes authentication failure.