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 Antworten
0
Akzeptierte Antwort

Hi,

What does the lambda do?

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

beantwortet vor 7 Monaten
  • 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
EXPERTE
beantwortet vor 7 Monaten
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

beantwortet vor 6 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen