AWS Storage Gateway User Guide
Error Responses
content-type:application/x-amz-json-1.1
host:storagegateway.us-east-2.amazonaws.com
x-amz-date:20120910T000000Z
x-amz-target:StorageGateway_20120630.ListGateways
content-type;host;x-amz-date;x-amz-target
44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a
The last line of the canonical request is the hash of the request body. Also, note the empty third line in
the canonical request. This is because there are no query parameters for this API (or any AWS Storage
Gateway APIs).
The
string to sign
for
Task 2: Create a String to Sign (p. 401)
AWS4-HMAC-SHA256
20120910T000000Z
20120910/us-east-2/storagegateway/aws4_request
92c0effa6f9224ac752ca179a04cecbede3038b0959666a8160ab452c9e51b3e
The first line of the
string to sign
is the algorithm, the second line is the time stamp, the third line is the
credential scope
, and the last line is a hash of the canonical request from Task 1.
For
Task 3: Create a Signature (p. 401)
, the
derived key
can be represented as:
derived key
= HMAC(HMAC(HMAC(HMAC("AWS4" + YourSecretAccessKey,"20120910"),"us-
east-2"),"storagegateway"),"aws4_request")
If the secret access key, wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY, is used, then the calculated
signature is:
6d4c40b8f2257534dbdca9f326f147a0a7a419b63aff349d9d9c737c9a0f4c81
The final step is to construct the
Authorization
header. For the demonstration access key
AKIAIOSFODNN7EXAMPLE, the header (with line breaks added for readability) is:
Authorization: AWS4-HMAC-SHA256 Credential=AKIAIOSFODNN7EXAMPLE/20120910/us-east-2/
storagegateway/aws4_request,
SignedHeaders=content-type;host;x-amz-date;x-amz-target,
Signature=6d4c40b8f2257534dbdca9f326f147a0a7a419b63aff349d9d9c737c9a0f4c81
Error Responses
Topics
•
•
Operation Error Codes (p. 404)
•
This section provides reference information about AWS Storage Gateway errors. These errors are
represented by an error exception and an operation error code. For example, the error exception
InvalidSignatureException
is returned by any API response if there is a problem with the request
signature. However, the operation error code
ActivationKeyInvalid
is returned only for the
API.
API Version 2013-06-30
402