I use the Gateway-to-Lambda API for several microservices, but in at least one case, the service will take 20-30 seconds, so in such cases I would like to send an immediate response to the client, something like:
status: 200 message: { progressId: 1234 }
and then allow the Lambda Function to continue (and periodically update the "processId" somewhere available to the client. The problem is that if you call context.succeed() , context.fail() or context.done() , which, apparently, the lambda functions are stopping from further execution, and yet this is the only way I know to flush the stdout buffer back to the API gateway.
This led me to a second approach, which I have not yet tried to solve (and for simplicity I would like to avoid), which includes an API gateway that calls the Responder function lambda, which then works asynchronously with Microservice and then immediately responds to the gateway API
I tried to illustrate these two parameters in the sketch format below. I would like to hear how someone was able to solve this problem.

source share