Book Image

Hands-On Serverless Computing

By : Kuldeep Chowhan
Book Image

Hands-On Serverless Computing

By: Kuldeep Chowhan

Overview of this book

Serverless applications and architectures are gaining momentum and are increasingly being used by companies of all sizes. Serverless software takes care of many problems that developers face when running systems and servers, such as fault tolerance, centralized logging, horizontal scalability, and deployments. You will learn how to harness serverless technology to rapidly reduce production time and minimize your costs, while still having the freedom to customize your code, without hindering functionality. Upon finishing the book, you will have the knowledge and resources to build your own serverless application hosted in AWS, Microsoft Azure, or Google Cloud Platform, and will have experienced the benefits of event-driven technology for yourself. This hands-on guide dives into the basis of serverless architectures and how to build them using Node.js as a programming language, Visual Studio Code for code editing, and Postman for quickly and securely developing applications without the hassle of configuring and maintaining infrastructure on three public cloud platforms.
Table of Contents (16 chapters)

Add to cart

Let's look at the use case of adding a hotel to the cart. What I'm going to walk through is a very slimmed down version of what an e-commerce, add to cart functionality, will look like. In reality, it is a very complex system to build and operate. As mentioned, we need the following resources for this use case:

  • Amazon Route 53 for storing the domain name of our hotel travel website, as discussed in the previous use case
  • Amazon API Gateway for handling the HTTP(S) that come to our hotel website to add a hotel to their cart
  • The AWS Lambda Function for handling the addition of hotels to carts
  • The Amazon DynamoDB table that stores the cart items, along with information such as hotel details, trip start date and end date, and the number of adults and children

The reference architecture of how the system works is shown in the following diagram. The flow for the...