API Gateway - integration exception with Lambda

0

Hello,

I have a configuration where an API Gateway has as integration a Lambda function. From time to time I have the below exception in my browser, and the below message in the browser debugger.

{
    "message": "Internal Server Error"
}

<body data-code-mirror="Readonly code editor." data-duplicate-keys="Duplicate keys detected in JSON object">
<div hidden="true">{"message":"Internal Server Error"}</div>

I do have the following error message in API Gateway log and NO logs in the Lambda logs that usually works and have logs.

{
    "requestId": "NnOWvjXDiYcEMvw=",
    "ip": "78.97.133.32",
    "requestTime": "30/Oct/2023:11:18:15 +0000",
    "httpMethod": "GET",
    "routeKey": "GET /searchFace",
    "status": "500",
    "protocol": "HTTP/1.1",
    "responseLength": "35",
    "errorMessage": "Internal Server Error",
    "errorMessageString": "Internal Server Error",
    "integrationError": "-",
    "integrationIntegrationStatus": "-"
}

When I added a new Parameter mapping for the Lambda integration, the error seams to appear more often.
Could you please specify the possible cause of the error ? Could it be in the API Gateway configuration ?

Thank you,
Mihai ADAM

3개 답변
0
수락된 답변

Hi,

What does the lambda do?

Did you try to call it via Postman? What do you receive and is it expected?

답변함 6달 전
  • Hello,

    Thank you for your idea. Unbelievable ! I used Postman to make the same call and it worked as expected. After this, I used again the Windows Edge browser. It worked each time without any error. Strange behaviour.

    Thank you, Mihai

0

What action are you taking to interact with the API? Is an an HTTP GET, POST, PUT, or something else? Can you share your payload or query?

AWS
전문가
답변함 6달 전
0

Hello,

Please see below the diagram of the entire application. The issue from this question took place in the last invocation, highlighted with red. I'm sorry that I forgot to mention that also the Authorization Lambda (the one that get the JSON security policy) did no log when the error occurred.

Enter image description here

Thank you,
Mihai ADAM

답변함 6달 전

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

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

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

관련 콘텐츠