Is there any kind of callback or event the lambda function can receive just before the runtime is frozen/shutdown?

0

I am running java based lambda function and using java, it is triggered by apigw and it uses AmazonSQSAsync client for sending msg to sqs asynchronously using sendMessageAsync() call. The concern is that, after the handleRequest() method returns the response, will the jvm / runtime environment immediately be frozen for later reuse? if yes, what happens to msg in flight as the call to sqs is async? Is there any kind of callback or event the lambda function can receive just before the runtime is frozen/shutdown? I don’t think so based on the lambda docs but wanted to check if anyone knows of any workaround for that.

1 Respuesta
0

I would suggest to visit https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtime-environment.html which talks about Lambda freezes the execution environment when the runtime and each extension have completed and there are no pending events.

profile pictureAWS
EXPERTO
respondido hace un año

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