Book Image

AWS Lambda Quick Start Guide

By : Markus Klems
Book Image

AWS Lambda Quick Start Guide

By: Markus Klems

Overview of this book

AWS Lambda is a part of AWS that lets you run your code without provisioning or managing servers. This enables you to deploy applications and backend services that operate with no upfront cost. This book gets you up to speed on how to build scalable systems and deploy serverless applications with AWS Lambda. The book starts with the fundamental concepts of AWS Lambda, and then teaches you how to combine your applications with other AWS services, such as AmazonAPI Gateway and DynamoDB. This book will also give a quick walk through on how to use the Serverless Framework to build larger applications that can structure code or autogenerate boilerplate code that can be used to get started quickly for increased productivity. Toward the end of the book, you will learn how to write, run, and test Lambda functions using Node.js, Java, Python, and C#.
Table of Contents (8 chapters)

AWS Management Console

After reading the previous section, you will be familiar with Lambda usage and pricing models. Now we are going to explore the AWS Management Console.

In this section, we are going to take a look at how to navigate the Management Console, how to switch between services, and what Amazon Web Service regions are. Get onto the landing page of AWS, aws.amazon.com. Sign in to the Management Console by clicking on the button in the upper-right corner. Once signed in, you will see a navigation bar on the top. On the left-hand side, there's a Services dropdown. You can see all the Amazon Web Services that are available to us, as shown in the following screenshot:

These services are all clustered by service category; for example, compute services such as EC2-Lambda are also in this category. We also have storage services, such as S3, the simple storage service. We also have database services, such as DynamoDB, a database service that we will use later. Finally, there are also application services, such as API Gateway. You can also pin certain services to your navigation bar to access them more quickly. Click on the little pin button and you can drag down a service or drag up a certain service. Click the little pin button again; now it's stuck to your navigation bar.

Regions

One concept that is important to know about is the concept of regions. I'm currently in the North Virginia, or US East 1, region. This is the default region for all Amazon Web Services. If I click on this drop-down menu, I can see other regions, such as Ohio, Northern California, Ireland, Frankfurt, and so on. Each region corresponds to an Amazon Web Services data center, and most services are specific to a certain region, so if you create resources, they are bound to the particular region that they were created in. If you switch region, you won't see resources that you created in another region. Moreover, not all services are available in all regions. If we click, for example, on Lambda, then we can see that Lambda is available in Northern Virginia, but it is not available in Canada Central, in Asia Pacific Mumbai, or in South America, at least not at the time of writing. So it will typically take some time before all regions catch up and support all services. In this tutorial, I will use the EU Frankfurt region, and I would advise that you use the same region so that what I show you is consistent with what you are doing.

So if you use a service in a certain region, it typically has a region-specific endpoint. You can find more information about regions and endpoints at docs.aws.amazon.com/general/latest/gr/rande.html.

The following screenshot shows regions where Lambda is available:

In the next section, we are going to create our first Lambda function. Let's get on with that!