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 réponses
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
EXPERT
Uri
répondu il y a 2 ans
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/

répondu il y a 2 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions