- Más nuevo
- Más votos
- Más comentarios
Hello.
Have you checked the request ID in CloudWatch Logs?
If the request ID is different, there is a possibility that Lambda is retrying when an error occurs.
Therefore, it is thought that the same log is being output four times.
https://docs.aws.amazon.com/lambda/latest/dg/invocation-retries.html
When Lambda is executed, the following logs should be output to CloudWatch Logs, so please compare them.
START RequestId: yyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy Version: $LATEST
How is your function triggered? If it is triggered asynchronously and your invocation fails, Lambda will retry the invocation several times.
If you want to prevent that, don't raise an exception. This way the Lambda service will think that the invocation was successful, and will not retry it.
Consider using RDS Proxy to handle database connections from a lambda: https://repost.aws/knowledge-center/lambda-rds-database-proxy
Contenido relevante
- OFICIAL DE AWSActualizada hace 2 años
- OFICIAL DE AWSActualizada hace 3 años