Title: PAW Rest Client: Generating HMAC-SHA256 Signature for AWS requests
Tags: paw-app
Question: I cannot successfully generate a signature for making AWS Requests using PAW.
Here is a link to the signature I am attempting to generate: http://docs.aws.amazon.com/AWSECommerceService/latest/DG/HMACSignatures.html#HMACAuth_ItemsRequired
I have already searched other StackOverflow posts such as: Paw rest client : how to compute HMAC-SHA256 using absolute url as input
Comment: I guess you're getting a warning (little orange flag in the top bar) saying that there's a circular dependency error? We're fixing this issue in the next version Paw 2.2.8 that should be released by next week. I'll update this thread with a good answer when it's released. Thank you!

Comment: I just answered the question below, both regarding the use of SHA-256 and with a general solution for using the Amazon Product Advertising API. I hope it helps!

Comment: Just installed the 2.2.8 update.  Please respond with updated answer when possible.  Thank you!

Here is the accepted answer: To answer your precise question about HMAC-SHA256 signatures, here's a code snippet that will work to compute this specific type of signature, returning the result Base 64 encoded in Paw (it uses the HMAC Dynamic Value programmatically):
function signHmac256(input, key) {
var dv = DynamicValue("com.luckymarmot.HMACDynamicValue", {
input: input,
key: key,
algorithm: 3 /* = SHA256 */,
uppercase: false /* keep hashes lowercase */,
encoding: 'Base64' /* encode hash data in base 64 */,
});
return dv.getEvaluatedString();
Otherwise, about the AWS Product Advertising API, we've made a dynamic value for it just today (which is a good opportunity for use to showcase the extension API), see AWS Product Advertising API Auth for Paw and the GitHub Repository here.
To use this dynamic value, first install it through the link shared above, then you can set up all other parameters and then enter a Signature parameter, and set this dynamic value as its value:
Open the token to enter your AWS Secret Key (used in the HMAC signature):
Comment for this answer: This should work for all AWS signatures and not just the E-Commerce Service, correct?
Comment for this answer: I'm frankly not sure. AWS uses different auth models for all services. I know Amazon S3 is using a different one (that Paw supports natively).


{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 3, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2016:00:01/07/16', 'FavoriteCount': 2.0, 'PostTypeId': 1, 'Tags': '<paw-app>', 'Title': 'PAW Rest Client: Generating HMAC-SHA256 Signature for AWS requests', 'ViewCount': 990, 'id': 34645998, 'user_AboutMe': '', 'user_AccountId': 4499742.0, 'user_DisplayName': 'Rob1202', 'user_Reputation': 59.0, 'user_Views': 2.0, 'user_id': 3658601.0}}