Overview of AWS Lambda and API Gateway

Sam Julien
InstructorSam Julien
Share this video with your friends

Social Share Links

Send Tweet
Published 3 years ago
Updated 2 years ago

Lambda functions are incredibly useful. They are affordable and can be triggered in a variety of ways. One of the most common is through an HTTP endpoint.

You can make an entire API without ever having to manage a server by writing Lambda functions and creating HTTP endpoints for them using API Gateway.

Sam Julien: [0:00] We're going to talk about two different services in AWS in this video. The first one is Lambda. Now, Lambda is serverless functions, so you're going to hear Lambda functions.

[0:12] Serverless functions are a kind of gateway for developers into AWS and Cloud infrastructure. You're going to find yourself using AWS Lambda functions quite often, because these are serverless functions that, basically, let you run code without having to spin up an entire server, using EC2.

[0:31] You can just have some sort of calculation or API endpoint, or something like that. You can run it in a language like JavaScript, or Python, or Go, and it'll just run. You just paste in your code or upload it, and you're off to the races. You don't have to worry about provisioning a server, or installing the operating system, or anything like that, like you would with an EC2 instance.

[0:54] These are super useful for developers. They're also really cheap, which is an added bonus. This is what the dashboard for AWS Lambda looks like. It will list out your functions. Then there is this Create Function button here that you're going to use pretty frequently. The things you need to know about AWS Lambda are just a few things.

[1:14] First, remember that it's serverless function. If somebody at your work asks you to create a serverless function to run a calculation or create an API endpoint, think about Lambda. The other thing to know about Lambda is that they're super inexpensive.

[1:30] You get a ton of Lambda calls each month for free. A lot of people use Lambda just all the time for building APIs and that kind of thing. You can afford to leave these running. You won't have to worry too much about having to clean these up when you're done with them.

[1:46] Then the last thing to know about Lambda is that there's a number of different ways that you can trigger these Lambda functions. For example, you could have a trigger set up for if there's a row created in a database or something like that, it could run a Lambda function.

[2:02] The most common way that you will probably see to trigger a Lambda function as a web developer is as an HTTP endpoint because we're going to use these for APIs. In order to do that though, you're going to need another service that we're going to cover called API gateway.

[2:20] API gateway and just the concept of API gateways are a lot. There's a lot to it and we're not going to dive too deep into that into this course. I just want to get you a high-level overview and let you be able to create an endpoint for a Lambda function.

[2:36] When you first go to Amazon API Gateway, you're going to see a page that looks something like this. You're going to be able to pick out what kind of API type that you want to build. We're going to be using an HTTP API in a couple of videos, and so that's what we'll be doing.

[2:53] API gateways, basically, let you string together different endpoints and add things to them, like route controlling, authorization, protection against high spikes in traffic, things like that. We're not going to dig into any of that in this course, but just know that that's out there.

[3:14] Let's go create a Lambda function, and then use API gateway to create an endpoint for it.

~ a minute ago

Member comments are a way for members to communicate, interact, and ask questions about a lesson.

The instructor or someone from the community might respond to your question Here are a few basic guidelines to commenting on egghead.io

Be on-Topic

Comments are for discussing a lesson. If you're having a general issue with the website functionality, please contact us at support@egghead.io.

Avoid meta-discussion

  • This was great!
  • This was horrible!
  • I didn't like this because it didn't match my skill level.
  • +1 It will likely be deleted as spam.

Code Problems?

Should be accompanied by code! Codesandbox or Stackblitz provide a way to share code and discuss it in context

Details and Context

Vague question? Vague answer. Any details and context you can provide will lure more interesting answers!

Markdown supported.
Become a member to join the discussionEnroll Today