Simple Serverless project for getting used to AWS Lambda and serverless computing.
In order to deploy the example, you need to run the following command:
$ serverless deploy
After running deploy, you should see output similar to:
Deploying aws-node-project to stage dev (us-east-1)
✔ Service deployed to stack aws-node-project-dev (112s)
functions:
hello: aws-node-project-dev-hello (1.5 kB)
After successful deployment, you can invoke the deployed function by using the following command:
serverless invoke --function hello
Which should result in response similar to the following:
{
"statusCode": 200,
"body": "{\n \"message\": \"Go Serverless v3.0! Your function executed successfully!\",\n \"input\": {}\n}"
}
You can invoke your function locally by using the following command:
serverless invoke local --function hello
Which should result in response similar to the following:
{
"statusCode": 200,
"body": "{\n \"message\": \"Go Serverless v3.0! Your function executed successfully!\",\n \"input\": \"\"\n}"
}