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?

feita há 2 anos472 visualizações
1 Resposta
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
respondido há um ano
  • 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

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas