AWS Lambda vs EC2: What to choose for your company and why?

Поділитися
Вставка
  • Опубліковано 23 січ 2025

КОМЕНТАРІ • 68

  • @Mortada_DEV
    @Mortada_DEV 3 місяці тому +5

    A REAL A+++ CONTENT.
    This is one of the best videos on UA-cam explaining the tradeoffs of using serverless vs dedicated servers. Something that can be of a great value for both technical and non-technical individuals when needed.
    This is the type of content that helps developers (especially the beginner ones) to advance their career, by providing a deeper understanding of crucial details that will ultimately assist them in making important and critical technical decisions down the line.

    • @renujadecosta6408
      @renujadecosta6408 3 місяці тому

      💯

    • @Lalit-yw2tb
      @Lalit-yw2tb 3 місяці тому +1

      Theo also made a video on this. Both of these videos are great.

    • @Mortada_DEV
      @Mortada_DEV 3 місяці тому

      @@Lalit-yw2tb Both are so knowledgeable, but sometimes I don't trust Theo's intentions that much.

  • @bagheldevansh
    @bagheldevansh 3 місяці тому

    love the content that you are making for the past 15 days, don't let the low view count stop these amazing videos!

  • @ooogabooga5111
    @ooogabooga5111 3 місяці тому +12

    If you let lambda explode crazy and say its good to be infinite for you* writing a bad code then your billing will be in billions. I'm happy to have my server crazy than to bear the risk of huge unexpected billing that comes out from no where. EC2 is enough for smaller applications.

  • @awesomeguy6427
    @awesomeguy6427 3 місяці тому +3

    watching this and now will act cool in meeting once I start throwing this. Thanks lol

  • @ggnova8581
    @ggnova8581 3 місяці тому +2

    This is the content we want keep going

  • @mr.sidpatil6528
    @mr.sidpatil6528 3 місяці тому +2

    When we have auto scaling group. Why do we need k8s?

  • @sahilaggarwal2004
    @sahilaggarwal2004 3 місяці тому

    Great Content!
    Just one thing which I didn't understand. At 9:50, you are saying "You tried to open a lot of files", how does it make sense to open a lot of files in a serverless environment?

  • @VaibhavShewale
    @VaibhavShewale 3 місяці тому +1

    quite helpful, i was confused to where to launch my saas project and as confused with lambda and costing guess i would go with ec2 only or will check something other cheap for now!

  • @ganeshgajelly
    @ganeshgajelly 3 місяці тому

    Thank you very much for explaining this topic. This helped me a lot Mehul 👍🏻

  • @thecoffecoder4503
    @thecoffecoder4503 2 місяці тому

    can you please tell me which software you used for drawing these diagrams?

  • @GopiSundharam
    @GopiSundharam 2 місяці тому

    You can use EBS and not worry about maintaining the server.

  • @prathamsinghal5261
    @prathamsinghal5261 3 місяці тому +1

    Why not then Fargate ?

  • @RajeshAravapalliAZ09
    @RajeshAravapalliAZ09 3 місяці тому +4

    Another option - Use Fargate with auto scaling - best of both worlds

    • @nou4605
      @nou4605 3 місяці тому

      Yeah everyone just forgets that ECS and Fargate exist.

    • @Sibearian_
      @Sibearian_ 3 місяці тому

      Is it like flyio?

  • @ronakagarwal9615
    @ronakagarwal9615 3 місяці тому

    haha had the same doubt yesterday while watching the video. thanks for this

  • @Deformatter45
    @Deformatter45 3 місяці тому

    As i have learned cloud and preety active on aws re post i have analysed that even though lambda is a good/cheap service for those individual or organisations which are small scale does not have that much invocations and complexity in their products and do not want any headache of downtime or managing instances and vms . Lambda is basically designed for the cost saving purpose of these kind
    Whereas EC2 , it is service particularly designed for scalable and complex applications , even though in some scenarios like complex website or task ec2 saves the cost as it using particular computing power and not using its 100% .
    Recently Amazon prime also shifted from serverless to EC2 and ECS to save their cost and scale their platform
    So no one can ec2 is better than lambda or lambda is better than ec2 both have thier own pros and cons also purposes for which they are designed for

  • @ajlearnings
    @ajlearnings 2 місяці тому

    Great explanation.
    I was just having a question.
    Can't, we solve the factors like Monitoring, Versioning, Zero down time Deployment, HA using k8s and helm with one ec2 instance being one pod ?

  • @ayushshende4290
    @ayushshende4290 3 місяці тому

    What are the edge cases from an engineering point of view where we have to - have to, move from serverless to serverfull or the other way round, irrespective of the cost but just from an engineering perspective ?

  • @ayushshende4290
    @ayushshende4290 3 місяці тому

    Does edge deployments also fall under these serverless category??

  • @Aditya-ym6sm
    @Aditya-ym6sm 3 місяці тому +1

    lets say i have scheduler service where user can give date and time and my service will try to send mail on that day and time, implementing this kind of feature is hard in serverless but at the same time i dont want to make ec2 instance and run cron jobs to make sure user gets the mail because my compute is just getting wasted and what if i dont have any scheduled mail i am just wasting resource for nothing how does someone solve this kind of problem

    • @codedamn
      @codedamn  3 місяці тому +2

      if it's not a strictly time sensitive task (for example it's okay for it to be delayed 1 minute), you can attach event bridge to lambda to make it a cron and run once every minute and let it check if there is any pending work from a database table.
      when you don't have any scheduled emails for lambda you'll probably spend less than 10-20ms (effectively just a db call) so you won't spend much.

    • @Aditya-ym6sm
      @Aditya-ym6sm 3 місяці тому

      @@codedamn i implemented this solution and cron is running every 2 mins but i was thinking of optimizing it, anyways cool video

  • @keshavtha
    @keshavtha 3 місяці тому

    I mean the thing is i have a turborepo and i will have to deploy each servcie individually to aws lambda but on ec2 i can simply run the whole turborepo as a monolith .

  • @minhhieple6483
    @minhhieple6483 3 місяці тому

    Great explanation!

  • @shreneekpatil220
    @shreneekpatil220 3 місяці тому

    Another quality content 👏

  • @anupamkumar7083
    @anupamkumar7083 3 місяці тому

    What is the software that is being used for the note taking and illustrations

    • @codedamn
      @codedamn  3 місяці тому

      tldraw

    • @anupamkumar7083
      @anupamkumar7083 3 місяці тому

      @@codedamn Thanks. Really good content, keep em coming.

  • @sourabhkaranjekar4220
    @sourabhkaranjekar4220 3 місяці тому

    So it will be decided by devs or devops team to use lambda or ec2

  • @tumulranjan569
    @tumulranjan569 3 місяці тому +1

    Can we get a video on EC2 vs baremetal (my own hardware and i got a beefy PC) regarding what should be my choice as a new buisness?

    • @aryanshmahato
      @aryanshmahato 3 місяці тому

      Try to stick to AWS or any other provider until you know exactly how to build a server and manage security!

    • @tumulranjan569
      @tumulranjan569 3 місяці тому

      @@aryanshmahato Thanks for the clarity! Building a server isnt gonna be a problem. Security will be. Thanks for the insight

  • @mustafahere01
    @mustafahere01 3 місяці тому

    What about DDOS attacks? Does lambda handle it automatically? coz in EC2, we have to handle it manually

    • @camels_are_sober
      @camels_are_sober 3 місяці тому

      You can use the API gateway to route your request through for both lambas and EC2 and use inbuilt rate limiter to mitigate ddos risk.

  • @Ahmed_Rehan0
    @Ahmed_Rehan0 3 місяці тому

    please complete Codedamn DevOps learning path,few courses are missing...........

  • @jami4588
    @jami4588 3 місяці тому +5

    Can you please keep it a little simple I have just started and it is overwhelming to watch your videos. Please elaborate some tech words/concept a little more. Thanks

    • @ayushporwal5950
      @ayushporwal5950 3 місяці тому +2

      bro, learn things then come here. why would you want a degraded content?

    • @injSrc
      @injSrc 3 місяці тому

      You can follow beginner friendly channels and you can always come back and watch this channel

  • @hacker57
    @hacker57 3 місяці тому +1

    I need this video thanks

  • @Sumitkumar-zw6wd
    @Sumitkumar-zw6wd 3 місяці тому

    Smart guy Mehul selling shovels

  • @vishalsinghpanwar2972
    @vishalsinghpanwar2972 3 місяці тому

    out of curiosity but any specific tool that you use at codedamn for calculating billing alerts or getting triggers or warnings when a certain aws threshold is crossed like in case when you get a lot of unexpected/unwanted requests ?

    • @codedamn
      @codedamn  3 місяці тому

      we use aws billing alerts (inbuilt), for some abuse requests we have custom infra for detecting and mitigation

  • @howhello354
    @howhello354 3 місяці тому

    ⚠️⚠️ please make a video on “why didn't you use serverless database?”

  • @zen.ali238
    @zen.ali238 3 місяці тому

    Love it !

  • @raodevendrasingh
    @raodevendrasingh 3 місяці тому

    many people on twitter are talking about self hosting with a vps instead of vercel for next js, whats that about? is it only for cost cutting ?

    • @Pawan-Poudel-yt
      @Pawan-Poudel-yt 3 місяці тому

      Vercel is the perfect platform to host NextJs application (Next js), if you can invest $20-30/month

  • @Shazzy-dev
    @Shazzy-dev 3 місяці тому

    Can you please make more video on coding motivation for mehul mohan hindi channel, because after sometime maybe after 4 to 5 days of coding for myself project. I got lost and don't know what to do... how can I code for long a period of time... I really want to get a job in a good tech company but i know i have to work hard.

  • @bhargavpurohit1478
    @bhargavpurohit1478 3 місяці тому

    I also made similar comments and here we go a new video😂

  • @Guru-mf3ew
    @Guru-mf3ew 3 місяці тому

    Just a suggestion for you, don’t switch from dark theme to light theme it seriously hurt my head, please and if you can please use Dark theme everywhere

  • @RAVIRAJLADHA
    @RAVIRAJLADHA 3 місяці тому

    informative

  • @basdfgwe
    @basdfgwe 3 місяці тому

    This video is good... but did you forget misuse of lambda that blows out your costs and bankrupts your lean startup while you were sleeping ?

    • @codedamn
      @codedamn  3 місяці тому

      yeah, you can put good rate limits + waf in front of it (via aws or cloudflare)

  • @algogi_technologies
    @algogi_technologies 3 місяці тому

    Basically it's cost of lambda vs cost of engineering

  • @HelloXori
    @HelloXori 3 місяці тому

    are you not using mongodb atlas anymore?

    • @codedamn
      @codedamn  3 місяці тому +1

      dropped it last year

  • @imamansoni
    @imamansoni 3 місяці тому

    Power cord got disconnected 🤣🤣

  • @ApoorvKhandelwal
    @ApoorvKhandelwal 3 місяці тому

    Only benefit of server over serverless is that I can sleep peacefully thinking that I will not receive 1,00,000$ bill tomorrow. 😊

    • @ikbo
      @ikbo 3 місяці тому

      You can set limits so this is not an issue in real life.

    • @ApoorvKhandelwal
      @ApoorvKhandelwal 3 місяці тому

      @@ikboI use vercel.. if you know how to set it in vercel(it is built on top of AWS)..let me know it would be helpful

  • @soorajpandey
    @soorajpandey 3 місяці тому

    better option: ECR -> ECS

  • @mayur9876
    @mayur9876 3 місяці тому

    Unpopular opinion: Use Neither

  • @ayushporwal5950
    @ayushporwal5950 3 місяці тому

    Hetzner is a very very bad service. Never ever deploy anything production. Also, goodluck getting verified :)