CORS Issue - React form / API Gateway / Lambda function / nodejs - Execution failed due to configuration error

0

HI There,

My question is about CORS issue when I'm trying to connect a React form to lambda function through api gateway. The backend is setup using Terraform scripts.

The API endpoints respond fine when testing with Postman however it throws the below error when hitting the api endpoints from React form -


HTTP Method: OPTIONS, Resource Path: /register

Execution failed due to configuration error: No match for output mapping and no default output mapping configured. Endpoint Response Status Code: 200

Method completed with status: 500

I've spent tens of hours trying to fix this using various guidance from the web however to no avail. Therefore has anyone faced this issue before and how did this get resolved.

1개 답변
0

Hi,

It's not a CORS issue, it's API Gateway misconfiguration. Please take a look here (and the following examples) https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-method-settings-execution-console.html how to configure output mappings.

profile picture
전문가
답변함 7달 전

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

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

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

관련 콘텐츠