Build Your First Rust AWS Lambda Function. High Performance Serverless.

  Рет қаралды 6,468

James Eastham

James Eastham

Күн бұрын

Пікірлер: 22
@MartinWhittington-h4r
@MartinWhittington-h4r Ай бұрын
This isnt working for me - something must have updated with the SAM framework or something. The makefile didnt exist (which I created) and then when I try and create/update the stack it fails due to the zip size of the lambda being too big
@serverlessjames
@serverlessjames Ай бұрын
Ah, yeah the makefile isn't needed anymore. This video was from before the cargo lambda integration was created. I'll have a look at the docs over the weekend, this should help in the meantime though. github.com/ServerlessDevelopers/serverless-rust/blob/731aa4de39a1adc18471a3481007e66474b40aa8/templates/patterns/api-patterns/actix-on-lambda/template.yaml#L11
@xes.software
@xes.software 2 ай бұрын
I'm in love with serverless Rust. My company is struggling so hard with GCP Cloud Run + Node.js coldstarts (3-10 second cold starts for our insane dependency tree). I went down the rabbit-hole, excited to introduce CF Workers, and also a possible prospect is Rust Lambdas.
@serverlessjames
@serverlessjames 2 ай бұрын
Nice! Both options are great, although with the new Cloudflare announcements this week there is some really cool stuff going on over there
@xes.software
@xes.software Ай бұрын
@@serverlessjames Yeah I'm going all in on the Cloudflare platform for our small company. I'm really curious what the trade-offs will end up being (besides of course the insane vendor lock in of workers)
@LifeCodeGame
@LifeCodeGame Жыл бұрын
This tutorial is a great way to get started with Rust and AWS Lambda. With Rust and AWS SAM, you can achieve lightning-fast response times and reduce the risk of downtime in your applications. Let's get started!
@serverlessjames
@serverlessjames Жыл бұрын
Thanks 👌
@glennsequeira8852
@glennsequeira8852 Жыл бұрын
Nice intro. I am looking forward to more of this series.
@serverlessjames
@serverlessjames Жыл бұрын
Thanks Glenn
@nofmxc
@nofmxc Жыл бұрын
Awesome video, James! I'll have to give Rust a try.
@serverlessjames
@serverlessjames Жыл бұрын
I'd highly recommend it. The learning curve is pretty steep and the compiler is very strict. But once you get used to it, it's a wonderful language to work with.
@adityapillai3091
@adityapillai3091 Жыл бұрын
Awesome tutorial, it was much clearer than the other videos I have been viewing! I'm completely new to Rust so I'm not used to most of the terminology, or how the code works exactly; However, my only goal is to currently figure out how to configure a code in Rust so that it is able to run on AWS Lambda. I have 2 questions if you don't mind helping me answer them: 1. There is an initialization portion for AWS in the main function. In the main method within my program, it is running the code that is essential to the main functionality of it. Would I still be able to keep the code I have in the main function if I were to add the code for the AWS Lambda setup? Or would there be some interference and I would have to move my code into a different method? 2. Are all the methods you went over in the video required to run a Rust code on AWS Lambda? A follow up question pertaining more towards your specific scenario, but are they general implementations of what is required? Sorry if these questions seem very basic, just trying to understand the requirements needed for and the correlation between the code on rust & AWS Lambda.
@serverlessjames
@serverlessjames Жыл бұрын
Thanks for the response, I'm glad it was useful. I think I'll cover some of your questions in later videos over the course of the month. But to answer them now: 1. Yes, the main method gets executed within the initialization phase of Lambda. If you have existing work happening you can likely leave that the same, but it will depend on what you are doing and it will affect the startup time 2. Yes, typically you will have a main method that Lambda uses as it's entry point. In the main method is where you will setup the runtime. You'll then have a handler method that contains your actual business logic Not basic questions at all, I'm new to Rust as well so had a lot of these same questions a few months ago.
@adityapillai3091
@adityapillai3091 Жыл бұрын
@@serverlessjames Thank you!!! This helps a lot; I'm more of a visual learner so being able to conceptualize all this is what I found most important for understanding. Keep up the content, I'll definitely tune into more!
@Abhishek54369
@Abhishek54369 10 ай бұрын
in your github it is written to use "make build" command but no make file?
@BRGustavoRibeiro
@BRGustavoRibeiro Жыл бұрын
James, great tutorial! I'm having some difficulties trying to build stuff for the AWS Graviton2 processor. Can you help me out with this one? I can't seem to find the settings to change the architecture of the build output. Thanks a lot!
@serverlessjames
@serverlessjames Жыл бұрын
Interesting, thanks for the comment. Could you provide any more detail on the error you are seeing?
@BRGustavoRibeiro
@BRGustavoRibeiro Жыл бұрын
@@serverlessjames I'm not seeing any errors - I just don't know how to change the build output from x86_64 to AWS Graviton2. I read some docs and read the config files within the project, to no avail :/
@serverlessjames
@serverlessjames Жыл бұрын
In the template.yaml file you should just be able to switch the 'Architecture' property from x86_64 to arm64. Have you tried that?
@BRGustavoRibeiro
@BRGustavoRibeiro Жыл бұрын
@@serverlessjames That was it! I can't believe that I missed it, and I opened that file multiple times hahahaha 😂 Thanks a lot for your help bro, you have no idea how your video helped me. Rust is my #1 language right now. Have a wonderful day 😊 👍
@serverlessjames
@serverlessjames Жыл бұрын
Thanks for the feedback. It's messages like that which keep me producing videos, so I appreciate the kind words ♥️🫂
@victorpacheco3107
@victorpacheco3107 Жыл бұрын
🤯🤯🤯 great!
Build a Serverless REST API with Rust & AWS Lambda
14:31
James Eastham
Рет қаралды 3,8 М.
Lambda SnapStart for your Serverless .NET Applications
17:39
James Eastham
Рет қаралды 498
The Ultimate Sausage Prank! Watch Their Reactions 😂🌭 #Unexpected
00:17
La La Life Shorts
Рет қаралды 9 МЛН
Увеличили моцареллу для @Lorenzo.bagnati
00:48
Кушать Хочу
Рет қаралды 8 МЛН
Farmer narrowly escapes tiger attack
00:20
CTV News
Рет қаралды 12 МЛН
That's It, I'm Done With Serverless*
23:58
Theo - t3․gg
Рет қаралды 205 М.
Async Rust Is A Bad Language | Prime Reacts
28:46
ThePrimeTime
Рет қаралды 107 М.
What's the hype with Rust and AWS Lambda?
11:23
James Eastham
Рет қаралды 1,4 М.
Rust Data Modelling Without Classes
11:25
No Boilerplate
Рет қаралды 180 М.
Easily Build and Deploy Serverless Functions on AWS with Rust
16:43
Use Arc Instead of Vec
15:21
Logan Smith
Рет қаралды 153 М.
I spent six months rewriting everything in Rust
15:11
chris biscardi
Рет қаралды 442 М.
The magic of Rust's type system
9:01
Let's Get Rusty
Рет қаралды 80 М.
The Ultimate Sausage Prank! Watch Their Reactions 😂🌭 #Unexpected
00:17
La La Life Shorts
Рет қаралды 9 МЛН