Simple project using serveless framework to learning and test features.
Install serveless CLI globally with NPM
npm install -g serverless
Create Project
serverless create --template aws-nodejs --path nodejs-serveless
Config Serveless
serverless config credentianls -o --provider aws --key=<my-key-here> --secret <my-secret-here>
Deploy
serverless deploy -v
Test function with servelesss invoke
serverless invoke local --function hello --path mocks/test.json --region us-east-1
Remove All
serverless remove
Start OFF line
serverless offline
Run test offline with aws CLI
aws lambda invoke /dev/null --endpoint-url http://localhost:3002 --function-name hello
References