Replies: 3 comments
-
Have you considered sending these tasks to a queue (for example, SQS) and processing them asynchronously? |
Beta Was this translation helpful? Give feedback.
-
Hi, just tried migrating this issue to a support discussion! It seems to have worked 😄 And yes, SQS is a better pattern here, even though a bit more work. @pfazzi you cannot execute tasks after emitting the response on Lambda. It seems like you can (if you read the code it does), but you can't. Lambda is frozen afterwards. |
Beta Was this translation helpful? Give feedback.
-
Yes, I totally agree with you guys, sending the task to a queue is maybe the best pattern. But you know, it costs more effort. In this case we can't spend more time on this feature, so we decided to go this way. Anyway I solved in another way my issue. Thanks anyway! |
Beta Was this translation helpful? Give feedback.
-
Since the lambda environment is not compatible with
fastcgi_finish_request
, how can I execute heavy tasks easily after the response has been sent?I tried with something like that, where in shutdown I execute some async tasks, but APIGateway still reaches the timeout limit...
Beta Was this translation helpful? Give feedback.
All reactions