Join Kirsten Hunter for an in-depth discussion in this video Lambda overview, part of Learning Amazon Web Services Lambda.
- [Narrator] Before we get started, I'm going to give you a brief overview of the Lambda system so you have some idea of the types of things you might be able to do with it. You have probably heard that Lambda provides serverless computing but what does that mean exactly? I mean, obviously, there's a server somewhere so what are the advantages to running your functions in the Lambda ecosystem? The first and best reason is that there is no administrative overhead to Lambda. You write your function, deploy it and it patiently waits for something to trigger it. Memory, storage, all of these things are handled separately and Lambda provides a framework which works great with the new microservice architecture style.
A Lambda function is just that. A function. It's not designed to be a complete application, just a specific action that should be triggered by an external event. If you think of Alexa as an example, someone could ask their Echo about the weather and it would call back to the Lambda function to get the response. So remember when contemplating Lambda functions that they are intended to be discrete things. Separate from each other. Each with a specific task to perform. Because these functions are event-driven, the Lambda function itself, only runs when triggered and you're only charged for the actual compute resources used by the function.
No traffic - no problem! Running a web server yourself would mean that you'd have to pay for the compute power even if nobody was using it but with Lambda it's a just-in-time system where you get what you need but only when it's actually needed. As with other AWS products, you can interact with Lambda via a web console or using the command line interface. There's even an API to integrate with your system if you prefer that. Lambda is a first-class member of the AWS product family. But what can you do with Lambda? The possibilities are really endless as you can take almost any application and break it down into triggered tasks.
But let me give you a few examples to consider. Data processing and transformation. When data is added to a database, or other system, a Lambda function can use that data to calculate other values, update the status of specific items, say update an order, or transform the newly created data into a friendlier format. Imagine if you have a job to regularly consume data from a specific provider but you need to reshape the data to work for your own needs. Lambda would be a great solution to that problem.
File processing with S3. One of the most common examples for Lambda is also one of the coolest. When somebody uploads an image to an F3 bucket, a thumbnail is created and uploaded to a separate bucket. Lambda integrates seamlessly with other AWS services and many of them, such as S3, can trigger a Lambda function directly. I mentioned Alexa, or Echo, and it's a great example of an integration where a user does something that triggers a function. This kind of integration can work with most IoT devices.
For instance, you could update a database when censor readings change. Which could, then, trigger a second Lambda function to reshape the data appropriately. The API gateway makes a couple of other things really easy. A mobile application almost always needs an HTTP interface and with the API gateway, you're able to tie HTTP requests into Lambda functions. In this course, I'll demonstrate how to tie these things together as I think it's one of the most powerful capabilities of Lambda. Similarly, the API gateway and Lambda can be combined to create a web application in a completely serverless environment.
Now that you've got an idea about what can be done with Lambda, let's dive in and get started!
- Working with the Lambda console
- Creating a Lambda function
- Exploring the Lambda console
- Lambda CloudWatch and monitoring
- Lambda application development
- Creating a Lambda API
- API framework setup
- Setting up API integration for READ
- Testing the API with HTTPie or cURL