One of the challenges a common developer finds when building serverless AWS Lambda functions is the test phase.
Lambda-Local package comes to the rescue, by simply installing the lambda-local package you’ll be able to flawlessly test your lambda functions.
npm install -g lambda-local
-f: The file that holds our function
-h: The function we want to execute
-e: The event input we want to test
-E: The environment variables we want to emulate
Demo Sample code
You can check a quick demo code at my github public page.
Package documentation link: https://www.npmjs.com/package/lambda-local
Wrote this post as a quick reminder for myself, hope helps someone else.