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?

demandé il y a 2 ans472 vues
1 réponse
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
répondu il y a un an
  • 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

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions