I have searched all through the net but didn't find a solution of how to make this functionality get succeeded. Require help.
My requirement is: I want a that if I trigger an aws lambda function written in node.js and uses an aws-serverless-express module must send back response quickly to API gateway but still should not exit and still run in the backend and we could see cloud watch logs. It must be asynchronous.
The code snippet is:
app.get('/check', function(req, res){
method.invoke(req)
res.status(200).send('success')
})
I did and checked like this but the lambda function gets stopped and returns the response to api gateway it didn't even runs the method.invoke() function in backend.
Please correct me if anything I am understanding or doing wrong. I checked with this link: Invoke AWS Lambda and return response to API Gateway asyncronously
Is it the only way to do this problem. Creating two lambda functions.