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

已提問 6 個月前檢視次數 251 次
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 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南