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)

Photo processing application

The three AWS services that we just learned about will make up our serverless app for photo processing. To recap, the three AWS services are:

  • Amazon S3
  • Amazon SNS
  • AWS Lambda functions

The reference architecture for the photo processing application is shown next. Let me break down what is going on here:

  1. The user uploads a photo to an S3 bucket
  2. The upload of the photo to the S3 bucket could happen in multiple ways:
    • AWS S3 Console
    • Application that acts as a layer in front of S3
    • AWS CLI
  3. However, the files get uploaded to the S3 bucket, due to the configuration that we have on the S3 bucket, and a notification is sent to Amazon SNS as soon as a file gets created in the S3 bucket
  4. The notification is sent to an SNS topic that has three subscribers:
    • A Lambda function that creates thumbnails for the photo that was uploaded
    • A Lambda function that creates...