2016-10-24 18:51:07 -07:00
..
2016-10-24 18:51:07 -07:00
2016-10-24 18:51:07 -07:00
2016-10-24 18:51:07 -07:00

Read this on the main serverless docs site

Hello World Node.js

Make sure serverless is installed. See installation guide

1. Deploy

serverless deploy or sls deploy. sls is shorthand for the serverless CLI command

2. Invoke the remote function

serverless invoke --function hello or serverless invoke -f hello

-f is shorthand for --function

In your terminal window you should be the response from AWS Lambda

{
  "message": "Hello World",
  "event": {}
}

Congrats you have just deployed and ran your hello world function!