O'Reilly logo

DevOps for Serverless Applications by Shashikant Bangera

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Invoking locally

Pushing the code to AWS Lambda and testing every time would be expensive and time consuming. So with Serverless Framework, we can invoke or test functions locally and then deploy them to the cloud. We can have this as part of the continuous deployment pipeline, where we can set the local invocation for dev stage deployment, set up automated testing, and then move them further down the pipeline to deploy and test remotely. The following command is used to invoke the function locally: 

$ serverless invoke local --function hello { "statusCode": 200, "body": "{\"message\":\"My Serverless World\",\"input\":\"\"}" }

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required