Skip to content

api.aws.signature.version3

tristanls edited this page Dec 16, 2012 · 1 revision

Generate AWS Version 3 Signature.

Since Version 0.0.0
Scope
accepts: public

Parameters

All parameters are optional, unless otherwise indicated.

awsAccessKeyId AKIAIOSFODNN7EXAMPLE required AWS Access Key Id
date Thu, 14 Aug 2008 17:08:48 GMT The Date or x-amz-date header field value
secretAccessKey wJalrXUtnFEMI/K7MDENG+bPxRfiCYEXAMPLEKEY required AWS Secret Access Key

Response fields

Response

authorization AWS3-HTTPS AWSAccessKeyId=KEYNAME,Algorithm=HmacSHA256,Signature=P... The X-Amz-Authorization header field value
date Thu, 14 Aug 2008 17:08:48 GMT The Date or x-amz-date header field value
signature PjAJ6buiV6l4WyzmmuwtKE59NJXVg5Dr3Sn4PCMZ0Yk= Calculated signature value
signatureMethod HmacSHA256 Signature method used for the request
signatureVersion 3 Signature version used for the request

Error

message Missing awsAccessKeyId Error message

Example

Request

crosstalk.emit( 
  '~crosstalk.api.aws.signature.version3', 
  {
    awsAccessKeyId : "KEYNAME",
    date : "Thu, 14 Aug 2008 17:08:48 GMT",
    secretAccessKey : "wJalrXUtnFEMI/K7MDENG+bPxRfiCYEXAMPLEKEY"
  }, 
  '~crosstalk', 
  function ( error, response ) { /* ... */ } 
);

Response:

{
  "authorization":"AWS3-HTTPS AWSAccessKeyId=KEYNAME,Algorithm=HmacSHA256,Signature=PjAJ6buiV6l4Wyzmmu...",
  "date":"Thu, 14 Aug 2008 17:08:48 GMT",
  "signature":"jAJ6buiV6l4WyzmmuwtKE59NJXVg5Dr3Sn4PCMZ0Yk=",
  "signatureMethod":"HmacSHA256",
  "signatureVersion":3
}

Error:

{
  "message": "Missing awsAccessKeyId"
}
Clone this wiki locally