From the course: Rust AWS Lambda
Introduction to serverless
From the course: Rust AWS Lambda
Introduction to serverless
- [Instructor] Here we have a AWS Lambda and serverless ecosystem with two Lambda functions working in coordination of a step function. One of the questions that many people have when they're first exposed to Lambda is, why do we care about this? What's the point of it? Well, first up, let's start with automatic scaling. Serverless platforms will automatically scale the number of function instances based on the demand. So this eliminates the need for manual intervention to provision or deprovision a server. So this is a huge one in terms of just putting some code into the cloud and letting it run. This auto-scaling capability then allows you to handle many different types of loads seamlessly from, let's say, a few requests per second to thousands of requests per second, and you don't have to change any of the code. In terms of cost efficiency as well, so you have pay as you go pricing and you only pay for the amount of resources that are consumed and not for a pre-allocated or idle server capacity, and this pricing model can lead to significant cost savings because it's event-based. So if we take a look as well on the language, if you're able to leverage one of the fastest languages in the world, which is Rust, it has up to 70 times less memory associated with the invocation than Python. So you could, at bare minimum, think about some of the same code running with 70 times less pricing. So that's another thing to consider, is the choice of language. Does it help you out as well? And then in terms of operational management, it's a serverless environment where the cloud provider takes care of the server provisioning, maintenance, patching, and capacity planning, and so this approach would free developers from the need to focus on any kind of infrastructure management. So this is a kind of a realistic type of scenario here. If you orchestrated two different Lambda functions, let's say that it's in Rust or Python, it doesn't really matter, and you have a payload at the very beginning that would go into the step function, the next thing that would occur is that that Rust code would then process it and then return back another payload. So this is typically what you would do, is you'd chain together these Lambdas. Now maybe the next function, just for simplicity's sake, would divide a payload, so it would look for a key total and then divide by two, and then it would return back a calculation. So you can chain together these pieces of code and they'll just sit there doing nothing. You're not charged until they're actually invoked, and also it can be event-based as well. So it can respond to, let's say, a change in a S3 bucket, or a change in SQS, or some other change. And this is really the beauty of using a serverless model, is that if you do it correctly, you're going to save a tremendous amount of revenue, and also from an operational standpoint, it's much more simple.
Contents
-
-
Introduction to serverless3m 17s
-
Rust and Firecracker2m 1s
-
Setting up Virtual Studio code for Rust3m 14s
-
(Locked)
Introduction to Cargo Lambda5m 43s
-
(Locked)
Rust cost advantage for Lambda3m 38s
-
(Locked)
Using AWS Lambda console5m 2s
-
(Locked)
Using Step Functions console3m 40s
-
(Locked)
Invoking Step Functions with CLI3m 15s
-
(Locked)
Building Rust AWS Lambda: Add function6m 51s
-
(Locked)
Building Rust AWS Lambda: Divide by two4m 30s
-
(Locked)
Invoking AWS Step Function from CLI3m 3s
-
(Locked)
Rust AWS Step Functions6m 44s
-
(Locked)
Serverless MLOps with EFS9m 38s
-
(Locked)
Rust AWS Lambda Function URLs4m 12s
-
(Locked)
Saving with ARM642m 45s
-
(Locked)
Polars Rust Lambda3m 20s
-
(Locked)
Building and deploying Polars Rust Lambda6m 5s
-
(Locked)
Using AWS console for Lambda4m 49s
-
(Locked)
Analyzing Rust AWS Lambda2m 42s
-
(Locked)
AWS Lambda Functional URL1m 54s
-
(Locked)
Building and deploying Polars Rust Lambda with URL3m 37s
-