Summary

In this chapter, we introduced you to serverless functions—a different approach to APIs and computation in general. Serverless functions don't need maintenance, scale automatically, are secure, and are simple to write. They may be a great option for operations that don't need a huge amount of requests, or for when demand spikes unpredictably. In addition to serving as APIs, lambdas can be scheduled with one line of code or triggered by an external event, such as a new file landing in an S3 bucket. The downside of serverless applications is that they have strict memory limitations that could be a serious barrier for certain tasks. The response time could also be longer for the first time after a long break—but there are ways to solve that issue to some extent.

As a practice exercise, we were able to recreate our 311 API endpoints as serverless applications. In addition, we wrote two more functions for scheduled data collection and the computation of medians. In other words, we used lambdas to recreate the functionality we achieved in Chapter 17Let's Build a Dashboard, and Chapter 18Serving Models with a RESTful API, together—all with serverless applications.

In the next chapter, we will learn about some best practices for using Python, a few issues with using Python, and the performance of Python.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.204.201