Available in all subroutines.
Returns an AWSv4 message authentication code based on the supplied
input, signing the string
s. The key is automatically prepended with the
"AWS", and should not be added by the caller.
This function does not support binary data for its
secret_key or string
declare local var.signature STRING;set var.signature = digest.awsv4_hmac("wJalrXUtnFEMI/K7MDENG+bPxRfiCYEXAMPLEKEY","20120215","us-east-1","iam","hello");
Try it out
digest.awsv4_hmac is used in the following solution recipes, which show real world use cases. Click RUN to provision a Fastly service, execute the code on Fastly, and see how the function behaves.
AWS S3 bucket origin (private)
Use AWS authenticated requests (signature version 2) to protect communication between your Fastly service and AWS.
User contributed notes
We welcome comments that add use cases, ideas, tips, and caveats. All comments will be moderated before publication. To post support questions, visit our support center and we'll find you the help you need.