Uses lambda-log thanks to schibsted/middy-error-handler#63
E.g. throw new createError.InternalServerError("something went wrong");
{
"statusCode": 500,
"message": "something went wrong",
"stack": "InternalServerError: something went wrong\n at baseHandler (/var/task/handler.js:14:9)\n at runRequest (/var/task/node_modules/@middy/core/index.js:86:32)"
}
https://github.com/serkan-ozal/middy-profiler
Example https://s.natalian.org/2022-03-29/cpu_profile.cpuprofile
Acknowledgments: Piotr Grzesik