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)

Writing data into Kinesis Stream with SDK (Java)

In this recipe, we will develop an AWS Lambda function that write to KDS using AWS Java SDK for Kinesis. Kinesis producers may also be developed using the Kinesis Producer Library (KPL); this is the more common option for non-serverless applications. However, with AWS Lambda, SDK-based code is generally preferred as we will be using less libraries.

Getting ready

You will need to have the following prerequisites for this recipe:

  • You need an active AWS account. You need to follow the Getting started section in the recipes Your first AWS Lambda and Your first Lambda with AWS CLI from Chapter 1, Getting Started with Serverless Computing on AWS to set up Java, Maven, the parent...