Fireship · @fireship

How to Burn Money in the Cloud // Avoid AWS, GCP, Azure Cost Disasters

Uploaded December 14, 2020 · Length 9:00

How to Burn Money in the Cloud // Avoid AWS, GCP, Azure Cost Disasters

Summary

Preventing massive cloud bills from AWS, GCP, Azure by setting budget alerts, avoiding infinite loops, and configuring scaling correctly.

  • cloud cost optimization
  • aws cost disasters
  • gcp cost control
  • azure cost management
  • serverless computing best practices
  • cloud scalability

Transcript preview

The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.

  1. 0:01

    when you decide to move to the cloud one

  2. 0:02

    of the first things you have to do

  3. 0:04

    is give them your credit card that's

  4. 0:05

    because they're giving you access to a

  5. 0:07

    massive network of computers worth

  6. 0:09

    billions upon billions of dollars when

  7. 0:10

    you write inefficient code on your own

  8. 0:12

    computer it's usually not a big deal the

  9. 0:14

    cpu fan might spin a little faster or

  10. 0:16

    things might run slower when you run out

  11. 0:17

    of ram

  12. 0:18

    but in the cloud it's a whole different

  13. 0:20

    ball game that recursive function you

  14. 0:21

    wrote can now scale infinitely around

  15. 0:23

    the globe

  16. 0:24

    blowing up cpu cores and melting solid

  17. 0:26

    state drives in the process

  18. 0:27

    and someone is going to have to pay for

  19. 0:29

    that mess in today's video we'll look at

  20. 0:31

    a real life story about how a startup

  21. 0:33

    just days away from launch racked up a

  22. 0:35

    72 thousand dollar google cloud bill

  23. 0:37

    stand it's gone didn't do too well it's

  24. 0:39

    gone poof

  25. 0:41

    we'll find out how that's even possible

  26. 0:43

    but more importantly we'll look at ways

  27. 0:44

    to prevent something like that from

  28. 0:46

    happening to you

  29. 0:46

    if you're new here like and subscribe

  30. 0:48

    then let's get right into it

  31. 0:50

    imagine spending months pouring blood

  32. 0:52

    sweat and tears into your startup

  33. 0:54

    you're just days away from the big

  34. 0:55

    launch doing some final testing here and

  35. 0:57

    there

  36. 0:57

    your product is ready to go you just

  37. 0:59

    need to scrape some data from the web to

  38. 1:01

    enrich the user experience

  39. 1:02

    you throw together some ad-hoc code to

  40. 1:04

    get the job done dockerize it

  41. 1:06

    then deploy it to a serverless platform

  42. 1:08

    like google cloud run

  43. 1:09

    it only needs to run for a few hours so

  44. 1:10

    you deploy it then call it a night

  45. 1:13

    you wake up to a couple of interesting

  46. 1:15

    emails our firebase project was upgraded

  47. 1:18

    from the free plan

  48. 1:19

    to the pay-as-you-go plan we must have

  49. 1:20

    enabled an api that requires billing

  50. 1:22

    which automatically upgraded the plan

  51. 1:24

    not to worry we already have a budget

  52. 1:26

    alert in place oh no

  53. 1:27

    the next email tells us our seven dollar

  54. 1:29

    budget has been exceeded

  55. 1:30

    the third email tells us our credit card

  56. 1:32

    was declined i wonder why that would be

  57. 1:34

    let's open the billing panel in google

  58. 1:35

    cloud no god please

  59. 1:37

    no no a bill of over five thousand

  60. 1:40

    dollars in just a few hours

  61. 1:42

    it has to be a mistake let's refresh the

  62. 1:44

    page and pray

  63. 1:45

    no no five minutes later the bill's at

  64. 1:49

    fifteen thousand dollars

  65. 1:50

    after twenty minutes twenty five

  66. 1:52

    thousand dollars the final bill settled

  67. 1:53

    up after about two hours just short of

  68. 1:55

    seventy two thousand

  69. 1:56

    increasing your startups burn rate by

  70. 1:58

    about six hundred dollars per minute