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 Respostas
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
ESPECIALISTA
Uri
respondido há 2 anos
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 há 2 anos

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas