My friend and I are working on a new serverless function and are hitting quite a roadblock.
We are using serverless version 1.30.2, and have created a simple s3 fetchImages function and when running it we get a response 502.
I have seen multiple topics on how to properly format our response and send it through the callback, and maybe we are just stupid and are missing something… but this is not working as expected.
Of course You can, I have deployed async lambdas, that return callback and they are working.
I use callback, when I need to return non default status codes.
I did some testing to better understand how async handlers work with Node 8.10 and the only advice I can give is don’t do it. It’s not supported by AWS and will fail for most use cases.
Why do you need to use callback to return non default status codes? Anything you return will be treated as success. For failure you can just throw an Error. Are you trying to return a failure with a result?