
Serverless tooling
Since this is the very first chapter that has application code and working examples, it's important to talk through some of the tooling and systems to set the stage for this and subsequent chapters. In this and the following chapters on web applications, our toolchain will consist of services from AWS:
- AWS API Gateway as the HTTP proxy
- AWS Lambda for computing
- AWS S3 for static file serving
- AWS CloudFront for the CDN
- AWS RDS for RDBMS management
- AWS Certificate Manager (ACM) for free certificate management
While AWS is the dominant player in the Platform as a service (PaaS) ecosystem, it is by no means the only choice. While reading this chapter and others in this book, remember that the patterns presented should apply to any cloud provider, albeit sometimes with a certain degree of adaptation.
You may be questioning the reasoning behind discussing other services such as S3 and RDS. Very often, perhaps usually, when people say serverless they are talking about functions as a service with AWS Lambda, or equivalent services from different cloud providers. This question is a valid one, but it's also critical to remember that our definition for serverless architectures in this book is complete systems where you don't need to manage any operating systems yourself. Your goal is not to maintain a single real or virtual server and push the hard work to your favorite cloud provider, allowing you to focus on your application. Admittedly, not all cloud providers have the vast number of services at our disposal as in the AWS ecosystem. Take this into consideration when choosing a PaaS upon which to build your serverless applications.
Building a system with a Function as a service (FaaS) backbone for the business logic is a step in the right direction; however, if you are still managing a database, are you serverless? Managing your own RDBMS or web server for the serving of static assets puts you outside of the serverless architecture box, even if your compute layer is serverless.
In Chapter 1, Introduction, I listed a few of the popular frameworks that allow us to manage, deploy, and maintain serverless applications. All of our sample applications in this book will use the Serverless Framework (https://serverless.com/), which will help us glue various services and systems together, allow us to deploy code, and provide much more functionality to make the development process faster and more straightforward. Just as with cloud providers, you have multiple choices for frameworks and utilities. Covering all of the options is outside the scope of this book and, for simplicity, we will stick with the Serverless Framework, which is mature, well used, and frequently updated.
Our example project will be a REST API for professional coffee evaluation, called cupping in the coffee realm. Coffee cupping at its core is nothing more than a fancy spreadsheet of scores for individual coffees, where scores are applied to one or more criteria, such as acidity, body, uniformity, and so on. If you enjoy coffee and APIs as I do, you should enjoy this and subsequent chapters.