Book Image

Serverless Programming Cookbook

By : Heartin Kanikathottu
Book Image

Serverless Programming Cookbook

By: Heartin Kanikathottu

Overview of this book

Managing physical servers will be a thing of the past once you’re able to harness the power of serverless computing. If you’re already prepped with the basics of serverless computing, Serverless Programming Cookbook will help you take the next step ahead. This recipe-based guide provides solutions to problems you might face while building serverless applications. You'll begin by setting up Amazon Web Services (AWS), the primary cloud provider used for most recipes. The next set of recipes will cover various components to build a Serverless application including REST APIs, database, user management, authentication, web hosting, domain registration, DNS management, CDN, messaging, notifications and monitoring. The book also introduces you to the latest technology trends such as Data Streams, Machine Learning and NLP. You will also see patterns and practices for using various services in a real world application. Finally, to broaden your understanding of Serverless computing, you'll also cover getting started guides for other cloud providers such as Azure, Google Cloud Platform and IBM cloud. By the end of this book, you’ll have acquired the skills you need to build serverless applications efficiently using various cloud offerings.
Table of Contents (12 chapters)

Your first custom metric (AWS CLI)

In the previous recipe, we learned how to check the automatically created CloudWatch metrics. We also learned some theory behind CloudWatch metrics. In this recipe, we will see how we can create a custom metric. We will create a simple functional scenario where we post a number of failed logins to the system. The sender may aggregate more requests within a set time, but we will not look at this in this recipe.

Getting ready

The following are the prerequisites for this recipe:

  • A working AWS account.
  • Access to AWS Management Console.
  • You should have configured AWS CLI as discussed in the recipe Your First Lambda with AWS CLI in Chapter 1, Getting Started with Serverless Computing on AWS.
...