AWS Sigv4 - signing requests against Lambda Function-URL #3741
Unanswered
schmallaria
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Anyone out there who knows if it's possible to sign Lambda Function-URL? I didn't find any working example. I checked Postman for that, signing requests via HTTP header is working, signing via Query string throws the exact same error. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We've to call a Lambda function via Azure API Gateway. For the Lambda function, we've enabled Function-URL feature and auth type is set to AWS_IAM. We've also configured an Identity Provider and a Custom Role to trust the Azure Identity and the role have the permission to call the Function-Url. Setup was done following this guide.
Now we've to sign the request to the Lambda function via AWS Sigv4. While we've to prevent the original authorization header, we can't sign the request via HTTP headers. We need to use query string signature for this request. However, query string signature is not working. AWS responds with the error
The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.
To calculate the correct signature, we're using AWS4Signer (AWSSDK.Core 3.7.402.33).
We've created a simple console application to test both signature methods, header signature and query string signature. Header signature is working as expected, we can sign the request and successfully call the Lambda function. We tried to compare both signature methods, but we can't figure out why query string signature is not working.
Is there anyone who can take a look at the code and point us into the right direction? Why is header signature working and query string signature not? I guess the signature for header and query string is the same, only the way it is transmitted is different.
Beta Was this translation helpful? Give feedback.
All reactions