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 Respuestas
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
EXPERTO
Uri
respondido hace 2 años
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/

respondido hace 2 años

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas