AWS Storage Gateway User Guide
Signing Requests
Header
Description
valid action for the requester. The format of this header is as follows (line
breaks added for readability):
Authorization: AWS4-HMAC_SHA456
Credentials=
YourAccessKey
/
yyymmdd
/
region
/storagegateway/
aws4_request,
SignedHeaders=content-type;host;x-amz-date;x-amz-target,
Signature=
CalculatedSignature
In the preceding syntax, you specify
YourAccessKey
, the year, month, and
day (
yyyymmdd
), the
region
, and the
CalculatedSignature
. The format of
the authorization header is dictated by the requirements of the AWS V4
Signing process. The details of signing are discussed in the topic
Content-Type
Use
application/x-amz-json-1.1
as the content type for all requests
to AWS Storage Gateway.
Content-Type: application/x-amz-json-1.1
Host
Use the host header to specify the AWS Storage Gateway endpoint
where you send your request. For example,
storagegateway.us-
east-2.amazonaws.com
is the endpoint for the US East (Ohio) region. For
more information about the endpoints available for AWS Storage Gateway,
see
Host: storagegateway.
region
.amazonaws.com
x-amz-date
You must provide the time stamp in either the HTTP
Date
header or the
AWS
x-amz-date
header. (Some HTTP client libraries don't let you set the
Date
header.) When an
x-amz-date
header is present, the AWS Storage
Gateway ignores any
Date
header during the request authentication. The
x-
amz-date
format must be ISO8601 Basic in the YYYYMMDD'T'HHMMSS'Z'
format. If both the
Date
and
x-amz-date
header are used, the format of
the Date header does not have to be ISO8601.
x-amz-date:
YYYYMMDD'T'HHMMSS'Z'
x-amz-target
This header specifies the version of the API and the operation that you are
requesting. The target header values are formed by concatenating the API
version with the API name and are in the following format.
x-amz-target: StorageGateway_
APIversion
.
operationName
The
operationName
value (e.g. "ActivateGateway") can be found from the API
API Reference for AWS Storage Gateway (p. 399)
.
Signing Requests
AWS Storage Gateway requires that you authenticate every request you send by signing the request. To
sign a request, you calculate a digital signature using a cryptographic hash function. A cryptographic
API Version 2013-06-30
400