AWS EC2 vs Lambda | Whats the difference? Pros and Cons?

  Рет қаралды 127,572

Be A Better Dev

Be A Better Dev

Күн бұрын

Пікірлер: 136
@BeABetterDev
@BeABetterDev 2 жыл бұрын
Looking to become an expert on AWS Lambda? Check out my new course: AWS Lambda - A Practical Guide www.udemy.com/course/aws-lambda-a-practical-guide/?referralCode=F6D1A50467E579C65372
@martinmohammed5500
@martinmohammed5500 Жыл бұрын
I have to be honest, I was watching a Udemy course about aws cloud solutions architect and it was very comprehensive. But I think your channel has the best explanations for the different services. Easy to understand and to follow, and you also combine different services in your video. You dont just explain what a ec2 instance is, but also mention that it can be combined with a load balancer and co. I mean that combining load balancer and ec2 is pretty basic, but I mean for an entire new beginner, having the connections early helps to connect things faster and I think you do it great. Have should find your channel earlier...
@mathewkargarzadeh3158
@mathewkargarzadeh3158 3 жыл бұрын
What a Ground Breaking Illustration between EC2 and Lamda Function !!!. I love you man. did you know, by sharing your wonderful knowledge , you also helping our humanity. and for that you have my gratitude. Million Thanks to you !!!. Mat. if you ever happen to be come to Colorado, I take you to dinner. a Restaurant of your Choice. I really mean it.
@BeABetterDev
@BeABetterDev 3 жыл бұрын
Mat, Comments like these are what inspire me to keep making videos. Thank you for such kind words of support and inspiration. I never thought of myself as helping humanity, but just a guy trying to help people navigate the world of AWS. I'm glad my videos have been helpful to you and so many others. I'll never stop making them! And if I ever and in Colorado, I'll send you over a message to get together. Cheers Daniel
@mathewkargarzadeh3158
@mathewkargarzadeh3158 3 жыл бұрын
@@BeABetterDev Thanks Daniel !!. absolutely. Please let me know. Thanks again. Mat.
@lynkbear3089
@lynkbear3089 3 жыл бұрын
Just started a new dev job and haven't worked with AWS that much. This video is better than any Udemy course I was given. Really cleared things up for me. Thanks :D
@BeABetterDev
@BeABetterDev 3 жыл бұрын
Hi Lynkbear, Super glad you enjoyed the video and found it helpful. Daniel
@Cloud-577
@Cloud-577 4 жыл бұрын
this deserves more love. Thank you so much
@BeABetterDev
@BeABetterDev 4 жыл бұрын
Thanks Azl, glad you enjoyed :)
@Cloud-577
@Cloud-577 3 жыл бұрын
@Draven Callan no we are not gonna do that
@Cloud-577
@Cloud-577 3 жыл бұрын
@Andreas Lorraine we shall not
@kedarnadkarni8781
@kedarnadkarni8781 3 жыл бұрын
This is one of the Awesome explanations with the most simplistic way of making one understand. Great Job. Rarely we find such tutorials.
@BeABetterDev
@BeABetterDev 3 жыл бұрын
Thanks so much Kedar!
@040040919
@040040919 2 жыл бұрын
Couldn't agree more.
@zubkat5196
@zubkat5196 3 жыл бұрын
I feel like you’ve been using the Feynman technique because this is one of the best explanations of anything I’ve ever seen. Awesome job!
@satoshinakamoto7253
@satoshinakamoto7253 3 жыл бұрын
if you study physics / engineering, you'll do so
@ramgarapati293
@ramgarapati293 2 жыл бұрын
I have been verifying couple of articles for identifying diff between EC2 and Lambda , but this video cleared all my doubts. Lambda server less definition was outstanding
@BeABetterDev
@BeABetterDev 2 жыл бұрын
Glad I could help Ram!
@VisuallyExplained
@VisuallyExplained 3 жыл бұрын
This was very illuminating. Thank you for putting in the effort, you just got a sub!
@BeABetterDev
@BeABetterDev 3 жыл бұрын
You're very welcome!
@reidysmeidy5772
@reidysmeidy5772 3 жыл бұрын
I think i have been studying AWS for like 2 months just to take a test for work but now I finally understand these two things xD
@BeABetterDev
@BeABetterDev 3 жыл бұрын
So glad to hear Reidy! Thanks for watching :)
@soulofangel1990
@soulofangel1990 3 жыл бұрын
that's one of the best explanations I've heard, I just like your content!
@BeABetterDev
@BeABetterDev 3 жыл бұрын
You're very welcome, Human!
@viniciuslongo4622
@viniciuslongo4622 3 жыл бұрын
great great great video! I am starting to learn about AWS and this video cleared up many questions. You earned a like and a new subscriber, thank you!
@BeABetterDev
@BeABetterDev 3 жыл бұрын
Thanks Vinicius, and welcome!
@glennadams7047
@glennadams7047 4 жыл бұрын
Thoughtful analysis! Glad you mentioned the cost comparison. Lambdas with something like Serverless Framework even eliminates the clicks :)
@BeABetterDev
@BeABetterDev 4 жыл бұрын
Thanks Glenn. Completely agree with serverless framework, they've really made Lambdas even easier to set up and get started these days :)
@andriys5772
@andriys5772 4 жыл бұрын
I would like to recommend Pulumi.
@gregshonle2072
@gregshonle2072 2 жыл бұрын
Very useful and informative. One extra thing to consider about lambdas is the cold start time. If a lambda is inactive, there is a (short) delay to spin up the lambda, which an EC2-based solution wouldn't have. Of course, once spun up, the next time the lambda is invoked will be pretty much immediate. Lambdas automatically spin down after a period of inactivity.
@segu_.
@segu_. 10 ай бұрын
This channel is gold!
@awintrysky
@awintrysky 2 жыл бұрын
Thank you, working at my AWS SA certs and this is great.
@BeABetterDev
@BeABetterDev 2 жыл бұрын
Glad I could help!
@otoattang2296
@otoattang2296 2 жыл бұрын
wow!! i just started with cloud and i understand this! Amazing!
@mradultiwari5820
@mradultiwari5820 3 жыл бұрын
Give this man a 🛡️🏅! I find this explanation easier than Amazon's wiki
@BeABetterDev
@BeABetterDev 3 жыл бұрын
Thanks mradul! Don't forget to try Sage! ;)
@omrimaher2754
@omrimaher2754 2 жыл бұрын
Amazing explanation, many thanks for your efforts
@kevinzhang1993
@kevinzhang1993 3 жыл бұрын
Great explanation . This is cleaner than some internal wiki
@BeABetterDev
@BeABetterDev 3 жыл бұрын
Thanks Kevin! Don't forget to check Sage! ;)
@nayyarsf
@nayyarsf 3 жыл бұрын
@@BeABetterDev What is Sage?
@paulofernandoee
@paulofernandoee 2 жыл бұрын
excellent video, congratulations for the great work
@BeABetterDev
@BeABetterDev 2 жыл бұрын
Thank you very much Paulo!
@tianhaowang5012
@tianhaowang5012 3 жыл бұрын
Best explanation on EC2 and lambda!!!
@BeABetterDev
@BeABetterDev 3 жыл бұрын
Thanks Tianho! Glad you found this useful :)
@amoltofi1
@amoltofi1 3 жыл бұрын
Can we talk on technology, I wish to learn more from you, please reach me at messenger id- amoltofi Insta I'd - amoldhaygude 👍
@musicaccount6482
@musicaccount6482 2 жыл бұрын
Crisp and easy to understand
@ttime9723
@ttime9723 3 жыл бұрын
Thanks mate! Great info and I can definitely come to a better decision now! :)
@Jazonet
@Jazonet 3 жыл бұрын
Very good explanation. Thanks!
@BeABetterDev
@BeABetterDev 3 жыл бұрын
Glad you enjoyed it!
@kawan5851
@kawan5851 2 жыл бұрын
Absolutely love your videos.
@BeABetterDev
@BeABetterDev 2 жыл бұрын
Thanks so much !
@venil82
@venil82 4 жыл бұрын
You talk about ease of hooking up API gateway and lambda, and standing up a quick restful API, can you make a video on that?
@BeABetterDev
@BeABetterDev 4 жыл бұрын
Hi darkruby, Check out the playlist here: kzbin.info/aero/PL9nWRykSBSFjHhg11falLLKxVExFnt1_c Cheers!
@venil82
@venil82 4 жыл бұрын
@@BeABetterDev thanks,!
@aussietramp
@aussietramp 2 жыл бұрын
Such a great video! Thanks!new subscriber here!
@BeABetterDev
@BeABetterDev 2 жыл бұрын
Thank you and welcome!
@thecodingnomad5063
@thecodingnomad5063 3 жыл бұрын
THIS IS A GREAT VIDEO !
@BeABetterDev
@BeABetterDev 3 жыл бұрын
Thank you so much!
@andypower5245
@andypower5245 3 жыл бұрын
Developing a image sharing website, And adding mobile phone apps to it, Is it better to use ec2 or lambda? I dont know a out server security... I use ec2 now, and as for websites, it's quite good. Another important question : If I have lambda, and later want to move everything onto my own server /s, is that easily possible (migration)?! Thanks!
@BeABetterDev
@BeABetterDev 3 жыл бұрын
Hey Andy, I'm more of a 'if it ain't broke, don't fix it' kind of guy. If you're getting good performance and are happy with using EC2, I would stick with what you know. I would say for websites, EC2 is a better choice though. For API development (REST, HTTP, etc), Lambdas are a great option. There is room in this world for both! Regarding your second question about migration, I would say that if you anticipate needing to migrate to your own server in the future, leverage Docker + Lambda configuration. This will make it super easy to port over later since the runtime environment is containerized and easily portable to any hardware type. I have a video on Docker + Lambda at this link if you are interested in learning more: kzbin.info/www/bejne/p2i9oGx_atubqMk Hope this helps! Daniel
@andypower5245
@andypower5245 3 жыл бұрын
@@BeABetterDev thanks, helped a lot!!
@mutley11
@mutley11 3 жыл бұрын
I feel it would have been useful to compare Lambda and Fargate (Function-as-a-Service versus Serverless)… then you might also include ECS as well to show the spectrum of benefits/concerns.
@BeABetterDev
@BeABetterDev 3 жыл бұрын
Thanks Cameron, this is a great idea for a followup video. Cheers.
@gulsimsek7988
@gulsimsek7988 3 жыл бұрын
Awesome, very good explanation thank you!
@charithjanitha7630
@charithjanitha7630 3 жыл бұрын
Thanks, keep it up!
@BeABetterDev
@BeABetterDev 2 жыл бұрын
Thanks Charith!
@IgnoreMyChan
@IgnoreMyChan 4 жыл бұрын
I'm still a bit confused. Your EC2 example was to host websites while your Lambda example was about a REST API. How would you host your (dynamic) website using Lambda? Is that possible?
@BeABetterDev
@BeABetterDev 4 жыл бұрын
Hi, it's the same concept - your ec2s can also host rest APIs by using a web server. The ec2 example was not to host to just host websites - it was to build a distributed web application. Lambda accomplishes restful APIs by using API gateway as a dependency. You can host your raw html/CSS/js using something like S3 + cloudfront.
@amoltofi1
@amoltofi1 3 жыл бұрын
Can we talk on technology, I wish to learn more from you, please reach me at messenger id- amoltofi Insta I'd - amoldhaygude 👍
@tomwilliam7299
@tomwilliam7299 2 жыл бұрын
Can I use Lambda with MongoDb, because I did not like dynamoDb ? 🤔🤔🤔🤔🤔🤔🤔😚
@JC-nw5zv
@JC-nw5zv 2 жыл бұрын
@BeABetterDev Thank you for your video. However, it's not complete. There are plenty of cases where it is best not to use lambda. Example: Cold Function (If your lambda application with very simple code there will have no problem. Lambda will be more faster than EC2 but If your lambda application requires multiple modules [eg. load Layer], it will be slower than EC2).
@annasirne197
@annasirne197 4 жыл бұрын
Great video! Thanks a lot!
@BeABetterDev
@BeABetterDev 4 жыл бұрын
You're very welcome, Anna!
@jasonreinhart5877
@jasonreinhart5877 4 жыл бұрын
Great video -- tons of info. THANK YOU
@BeABetterDev
@BeABetterDev 4 жыл бұрын
Glad you enjoyed it!
@rakeshbhat5102
@rakeshbhat5102 2 жыл бұрын
nice and very well done. is it possible to share the slide? thanks!
@davi81100
@davi81100 3 жыл бұрын
Thank you for your classes! They are very clear and relevant to help understand AWS services. I have serious doubts on the development of APIs in EC2 with API Gateway services, but I'm not finding references to clarify them. Do you have any video that explains that in detail? Thanks again.
@AkashYadav-rj6fn
@AkashYadav-rj6fn 4 жыл бұрын
Hii, can you make a video on how to add Http security headers on our web app which is hosted on EC2 pls. It will be a great help.
@warriorgeneral2735
@warriorgeneral2735 3 жыл бұрын
Lambda functions don't have a sleep right, So the first invocation won't be slow?
@BeABetterDev
@BeABetterDev 3 жыл бұрын
Hi Rohan, Lambda functions suffer from a phenomenon called Cold Start. Cold start is the initial provisioning of the function's code (and dependencies) that need to be loaded prior to execution.
@goacademy-io
@goacademy-io 2 жыл бұрын
Nice explanation! Which app do you use for writing?
@sibanandapanda4597
@sibanandapanda4597 3 жыл бұрын
Your way of exaplaning the things is really awesome , if possible could you please share with us api gateway link , I want to watch that video too 👍🏻Thank you for making these useful videos 👍🏻
@BeABetterDev
@BeABetterDev 3 жыл бұрын
Thanks so much Sibanandra. I believe the video I was referring to is this one: kzbin.info/www/bejne/q3fWkpx7nddksNU Hope you enjoy!
@nccamsc
@nccamsc Жыл бұрын
2056 MB or 2048 MB (2GB) max for lambda functions? 2056 is a strange number in computer parlance. 2048 (2^11) is not.
@vadymesch2267
@vadymesch2267 2 жыл бұрын
great stuff
@brunospasta
@brunospasta 3 жыл бұрын
I always find it a bit hard to properly test all my Lambda functions. Is there somehow a service to "unit test" Lambda functions?
@BeABetterDev
@BeABetterDev 3 жыл бұрын
Hi Jo, Great question. Check out this video for a way to test our your lambda functions locally before pushing your code: kzbin.info/www/bejne/d4a0g6yiZriBmbc In terms of unit tests, the Lambda is just a function at the end of the day, so you can unit test its functionality like normal in your code base. Hope this helps. Daniel
@DMortician
@DMortician 4 жыл бұрын
Nice video as always, though I have a couple of questions: About pricing, say we have 1 on-demand EC2 instance provisioned behind an ALB and ASG with min:1 des:1 max:1 configuration, is this a valid architecture for handling "bursty" workloads than using Lambda? Can we combine the use of EC2 and Lambda at the same time for the same web server? I'm very new to AWS so I don't have an in-depth knowledge about these services yet. Thanks in advance.
@webcodeuniversity
@webcodeuniversity 4 жыл бұрын
@Marcus Erectus for me doesn't make sense to have max to 1 if you really want to scale but you can set rules to scale up say up to 5 or whatever number is depends on your case. for 2nd question, yes we used EC2 with lambda in some use cases
@sandipansarkar9211
@sandipansarkar9211 2 жыл бұрын
finished watching
@balanced-living
@balanced-living 2 жыл бұрын
Great video. What about the use case part in terms of on-demand EC2 ? Will they both tie in-terms of advantages or still you prefer lambda ?
@rishiraj2548
@rishiraj2548 Жыл бұрын
Great thanks
@ajpsv
@ajpsv 4 жыл бұрын
Amazing to the point explanation.
@BeABetterDev
@BeABetterDev 4 жыл бұрын
Thanks Kya! Glad you enjoyed.
@mountp1391
@mountp1391 3 жыл бұрын
Thank you
@BeABetterDev
@BeABetterDev 3 жыл бұрын
You're very welcome!
@markkevnjflores
@markkevnjflores 6 ай бұрын
Thanks broo
@bhaskerthapa6534
@bhaskerthapa6534 3 жыл бұрын
Thanks
@BeABetterDev
@BeABetterDev 3 жыл бұрын
You're very welcome bhasker!
@kevin73911
@kevin73911 2 жыл бұрын
Thank you. ; )
@BeABetterDev
@BeABetterDev 2 жыл бұрын
You're very welcome Po!
@alxjones
@alxjones 3 жыл бұрын
I don't think the cost comparison is really fair here. On a per-instance basis, EC2 "rent" is based on whether it's on-demand, reserved, or spot, as well as the enormous list of possible choices for resources. Then, if you're using autoscaling (which you probably should), EC2 costs depend on traffic and compute time as well, but in a much less transparent way because it's not as granular as Lambda. Because EC2 is more flexible, there are so many more levers when it comes to adjusting and calculating costs. Lambda is based on just 3 numbers: 1 you choose and the other 2 you can get directly from metrics.
@krishnachaitanya8088
@krishnachaitanya8088 4 жыл бұрын
Good explnation, Thanks
@BeABetterDev
@BeABetterDev 4 жыл бұрын
Very welcome Krishna, thanks for watching!
@dannavarrodiederichs7482
@dannavarrodiederichs7482 Жыл бұрын
So, serverless didn't mean without servers, instead, it means that the logic from the servers set up is abstracted away from you and managed by AWS. Thank you!
@HeavensMeat
@HeavensMeat 4 жыл бұрын
Nice video :) Just wondering, is it out of the realm of possibilities for you to go over Apache Airflow? Specifically ETLing in it? I heard that a lot of companies will use something like that over just having a bunch of redshift/lambdas as their ETL (especially if it goes over 15min limit anyways or redshift wlm taking too long and timing out lambda)
@BeABetterDev
@BeABetterDev 4 жыл бұрын
Hi there! I'll look into Apache Airflow. Thanks for the suggestion. Thanks for watching!
@arpitanand6534
@arpitanand6534 3 жыл бұрын
You didn't talk about cold startup in AWS Lambdas
@davyslj
@davyslj 3 жыл бұрын
EC2 is elastic compute cloud. Not cloud compute
@BeABetterDev
@BeABetterDev 3 жыл бұрын
Thanks DaFaGe! I always get this point mixed up.
@subhashismohanty5420
@subhashismohanty5420 3 жыл бұрын
You are awesome
@BeABetterDev
@BeABetterDev 3 жыл бұрын
Thanks Subhashis, so are you!
@VishalSharma-rn7mt
@VishalSharma-rn7mt 3 жыл бұрын
Awesome
@saishanmukkha
@saishanmukkha 3 жыл бұрын
Nice
@erythsea
@erythsea 2 жыл бұрын
You teach like sal khan, from khan academy 😺 (good thing)
@BeABetterDev
@BeABetterDev 2 жыл бұрын
Thats what I was going for :) Thanks!
@erythsea
@erythsea 2 жыл бұрын
@@BeABetterDev no problem. I just wanted to say that your vids have helped me with some aws tasks at work! (I’m an intern)
@ceeyesharish
@ceeyesharish 4 жыл бұрын
Actually it's Elastic Compute Cloud
@BeABetterDev
@BeABetterDev 4 жыл бұрын
Thanks for pointing this out! I always get this mixed up.
@Lucky-jm5if
@Lucky-jm5if 2 жыл бұрын
serverless is a misguide word..... it should be "manageless server"
@BeABetterDev
@BeABetterDev 2 жыл бұрын
Very good point lucky
@whitehh15
@whitehh15 3 жыл бұрын
How does anyone love lambdas? Deployment takes forever
@judening2614
@judening2614 4 жыл бұрын
But still, using lambda really like doing drugs. They get very expensive real quick. Unless your company has endless money or you work for Amazon, the budget is gonna be insane.
@BeABetterDev
@BeABetterDev 4 жыл бұрын
Hi Jude. Cost really depends - if you have consistent invocations on your application, then I 100% agree with you - Lambdas will *probably* end up costing more. However, if you have bursty or unpredictable invocations, you can save quite a bit of money using Lambdas. I've personally found I was able to shave off ~30% of my infrastructure cost by switching from EC2 to Lambda. Again, this is very use case dependent.
@martinsapo100
@martinsapo100 3 жыл бұрын
Awesome video! Thanks you very much!!!
@BeABetterDev
@BeABetterDev 2 жыл бұрын
You're very welcome!
@CesarLopez2808
@CesarLopez2808 3 жыл бұрын
Great explanation! Thanks!
@BeABetterDev
@BeABetterDev 3 жыл бұрын
Thank Cesar! Glad you enjoyed :)
@matthewkim5420
@matthewkim5420 3 жыл бұрын
Great video, thanks so much!
@BeABetterDev
@BeABetterDev 3 жыл бұрын
You're very welcome Matthew!
@mondayemmanuel191
@mondayemmanuel191 3 жыл бұрын
Great content! Thank you.
@BeABetterDev
@BeABetterDev 3 жыл бұрын
Glad it helped!
@TatianaGuzun-k4r
@TatianaGuzun-k4r 11 ай бұрын
Such a great video. Thank you
@TheJimmyplant
@TheJimmyplant Жыл бұрын
Amazing video. Thanks so much!
AWS EC2 vs ECS vs Lambda | Which is right for YOU?
16:50
Be A Better Dev
Рет қаралды 195 М.
AWS SQS vs SNS vs EventBridge - When to Use What?
22:37
Be A Better Dev
Рет қаралды 189 М.
So Cute 🥰 who is better?
00:15
dednahype
Рет қаралды 19 МЛН
Don’t Choose The Wrong Box 😱
00:41
Topper Guild
Рет қаралды 62 МЛН
AWS Aurora VS DynamoDB
38:39
Be A Better Dev
Рет қаралды 83 М.
Using Python to Automate AWS Services | Lambda and EC2
24:10
Travis Media
Рет қаралды 32 М.
What is AWS Cloudformation? Pros and Cons?
16:25
Be A Better Dev
Рет қаралды 144 М.
Introduction to AWS Lambda & Serverless Applications
56:02
Amazon Web Services
Рет қаралды 319 М.
AWS EC2 on ECS vs Fargate | Whats the Difference and When To Use What?
14:54
So Cute 🥰 who is better?
00:15
dednahype
Рет қаралды 19 МЛН