Internal Server Error from API Gateway when sending queries through gateway to Lambda function connected to RDS database

0

I have an S3 website that is connected to a database through an API Gateway and a Lambda function. The API Gateway receives SQL queries as text and passes them to the Lambda function. The Lambda function runs those queries against the database and returns the query results to the API Gateway. The API Gateway then sends the results back to S3. This usually works fine, except whenever I use an Insert statement with multiple values. Whenever I try to insert multiple rows into the table at the same time, I get an internal server error with code 500. How can I avoid this?

2 Risposte
0

Maybe your function times out? Check the function logs to find out if it failed or not. If all OK in the function, enable execution logs in API Gateway and check why it reports a failure.

profile pictureAWS
ESPERTO
Uri
con risposta 2 anni fa
0

In addition to Uri - review the following url which does have some good tips to resolving the issue
https://aws.amazon.com/premiumsupport/knowledge-center/http-5xx-errors-s3/

con risposta 2 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande