Photo by RealToughCandy.com: https://www.pexels.com/photo/man-love-people-woman-11035380/

Stop using serverless-webpack for AWS Lambda

I see that nodejs lambda projects are built using serverless and often include serverless-webpack. It is used to implement babel and get the latest javascript syntaxes, especially module and top-level awaits. But as per this blog post, the AWS lambda environment already supports these features, so we should no longer need to use serverless-webpack. There are some cons that I face while using webpack in serverless. Code is transpiled (and optionally minified), making it challenging to debug from logs, as line numbers and function names may not be the same per your development environment....

October 6, 2022 · 1 min · Vikas Kumar