问题
I have generated the aws signature using the code.
function getSignatureKey(key, dateStamp, regionName, serviceName) {
var kDate= lCase(HMAC(ARGUMENTS.dateStamp,"AWS4" & ARGUMENTS.key,"hmacsha256"));
var kRegion= lCase(HMAC(ARGUMENTS.regionName,binaryDecode(kDate,'hex'),"hmacsha256"));
var kService=lCase(HMAC(ARGUMENTS.serviceName,binaryDecode(kRegion,'hex'),"hmacsha256"));
var kSigning= lCase(HMAC("aws4_request",binaryDecode(kService,'hex'),"hmacsha256"));
return kSigning;
}
<cfset signature = getSignatureKey("fdsaadsf87324hdsfo4324d324", "20170504", "us-west-2", "AWSECommerceService")>
but when i call the api and dump the response it says that "The request signature we calculated does not match the signature you provided"
I am following this link my How to derive a sign-in key for AWS Signature Version 4 (in ColdFusion)? my result is matching with their result when i put their values. But when i put original values of my own account it does not match.
来源:https://stackoverflow.com/questions/43786964/aws-signature-is-not-validating-in-amazon-api