You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an AWS Lambda function which I would like to call via a function URL IAM_AUTH. I am struggling to make the request work with aws4-axios. What does work is:
A request to a Lambda function URL with authentication NONE
A request to a Lambda function URL with authentication IAM_AUTH, using long-term AWS credentials
However, If I use temporary security credentials with IAM_AUTH, I get HTTP 403 and the message The security token included in the request is invalid.
At first I thought I am doing something wrong, maybe some sort of misconfiguration. But when I use aws4fetch instead of aws4-axios, it works. This is the code:
Attached are the request using aws4-axios that does not work and the request with aws4fetch that does work.
I noticed that aws4-axios signs the headers accept, content-length and content-type which aws4fetch does not sign. But I have no idea if this is the cause of the error.
I have an AWS Lambda function which I would like to call via a function URL IAM_AUTH. I am struggling to make the request work with aws4-axios. What does work is:
However, If I use temporary security credentials with IAM_AUTH, I get HTTP 403 and the message The security token included in the request is invalid.
This is how I create the interceptor:
And this is how I make the request:
At first I thought I am doing something wrong, maybe some sort of misconfiguration. But when I use aws4fetch instead of aws4-axios, it works. This is the code:
Attached are the request using aws4-axios that does not work and the request with aws4fetch that does work.
I noticed that aws4-axios signs the headers
accept
,content-length
andcontent-type
which aws4fetch does not sign. But I have no idea if this is the cause of the error.request-aws4-axios.txt
request-aws4fetch.txt
The text was updated successfully, but these errors were encountered: