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?

질문됨 2년 전471회 조회
1개 답변
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
답변함 일 년 전
  • 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

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠