5 Houston, we have a problem!

 

This chapter covers

  • Reading console logs using CloudWatch
  • The challenges of debugging serverless applications
  • Debugging serverless APIs

By our nature, we—humans—aren’t perfect. No matter what we do, there is always the possibility of making a mistake, even if we do our best not to make one. This is especially true when developing or interacting with software. Do you remember the last time when a mobile application you were using crashed or a website stopped responding? Chances are you have experienced this recently, and you had to refresh your browser or restart your app.

We all make mistakes, and applications crash on a daily basis. Though usually harmless, application bugs can sometimes result in huge losses. Let’s take the example of a bug occurring in your pizzeria application that prevents you from creating orders. How would you find the bug in the first place? How does debugging work in serverless applications?

This chapter helps you learn how to find errors in your serverless applications, how to debug them, and what debugging tools you have at your disposal.

5.1 Debugging a serverless app

5.2 Debugging your Lambda function

5.3 X-Ray your app

5.4 Taste it!

5.4.1 Exercise

5.4.2 Solution

Summary