Unable to use X-Http-Method-Override header with Lambda Function URL

0

When trying to invoke a Lambda function through its function URL issuing a POST request with "X-Http-Method-Override" header set, the response is always HTTP 403 Forbidden with body:

<AccessDeniedException>
  <Message>Unable to determine service/operation name to be authorized</Message>
</AccessDeniedException>

Is there anything I can do to use this header to change the HTTP method? Alternatively, can I pass it to the function?

asked 2 years ago461 views
1 Answer
0

The link below provides details for accessing header info associated with Lambda function URLs. It has sample code to parse the passed header info, similar to how it is passed from API Gateway via the event structure when Lambdas are invoked in that manner. Your function URL Lambda can then invoke subsequent methods as needed. Function Lambda URL Headers

AWS
AWSdave
answered a year ago
  • Maybe it's not clear, but I cannot reach the function if I set that request header. I don't need to know how to retrieve its value, but how to execute the function with that header set.

  • Can you verify that the Auth Type is set to None on the Lambda?

  • Yes, the auth type is set to NONE

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions