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?

回答済み 7ヶ月前
  • 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
エキスパート
回答済み 7ヶ月前
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ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ