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 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则