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

Serverless logs

What happens if something goes wrong? We do not have error handling in place, but we can test the logging just by feeding the error while invoking the function. So, let's invoke the function with an error in the data, as shown in the following code: 

$serverless invoke --function bikesearch --data '{"trm":"Albemarle"}' -lServerless: Calling function: bikesearch...  Error --------------------------------------------------  Internal Server Error     For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.  Get Support --------------------------------------------     Docs: docs.serverless.com     Bugs: github.com/serverless/serverless/issues     Forums: forum.serverless.com     Chat: gitter.im/serverless/serverless Your Environment ...

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