I am trying to create the signature for AWS Mechanical Turk, using Node.js, but am having trouble doing so. At the moment I am using the following, but keep getting errors:
CryptoJS.HmacSHA1(service + operation + timestamp, process.env.SECRET_ACCESS_KEY);
The explanation of the signature is at this link. It states that to create a signature
A request signature, an HMAC, is calculated by concatenating the values of the Service, Operation, and Timestamp parameters, in that order, and then calculating an RFC 2104-compliant HMAC, using the Secret Access Key as the "key." The computed HMAC value should be base64 encoded, and is passed as the value of the Signature request parameter. For more information, go to http://www.faqs.org/rfcs/rfc2104.html.
I think this will work for you (I use
GetAccountBalance
) as a simple example: