@@vogel2499 This. You should have the option for a pre-paid service aka "once your account runs out of money, you're informed that your services have stopped and will continue to run after you've added more money to your balance." Especially in countries where credit card aren't a thing. I e.g. live in Germany and here we have debit cards (aka you cannot go lower than 0€ in your bank account which is much more preferable in my opinion) and really only a handful of people have credit cards. And ordering one just so I'll be able to use cloud services is just ridicolous.
Yes, I did burn money in the google coud, 5600$ bill in 4 hours - was attached by a scraping bot and thanks google cloud they understood and "reset" the bill
I'm so glad we're on premise. We recently had a problem in production because we loaded thousands of records into memory by mistake, spinning up CPU and RAM usage. This made some customers unhappy because they couldn't use our service, but imagine this happening in the cloud. Unhappy customers AND a bill for useless work done!
You still paid for the hardware wear and tear, you still paid for the electric, cooling, any networking costs, etc. It just feels good because the bill isn't lumped into "here all your compute, storage, etc usages now pay us".
@@rickytorres9089 But it's also a natural barrier since we could only use up the resources we physically have. While cloud providers have cost and scaling caps, it's easy to configure them wrong. One misclick and you spin up hundreds of instances.
My first experience with cloud computing was with a simple GCP windows machine that had set rules (I explicitly set it to NOT grow, to avoid cost). It fit well into the free trial, so I just let it be. I deleted the machine after 6 months (out of 12 for free trial) and never really used GCP again. Then I got a bill for 50$ for a machine I didn't even have access to (because it got deleted), and only thing their support said is to tell my bank to block it. Nice
It's not 24 hours a day for 12 months, Compute Instances have a limited free trial time by hours. And just by reading 6 months, I am pretty sure you exhausted that free time limit of Compute Engine.
One of my major fears while learning cloud. There should be a limit for how much you spend on the services, but I think no provider has this as a configuration.
I've heard many tales about people forgetting to turn a demo project off but all of them just contacted their cloud providers (GCP & AWS, not sure about Azure) and all them replied "np" and cancelled their billing - Still I really want to watch this video asap. Great content as usual man!
6:00 It's interesting 69k/71k of the budget was related to Firestore reads pricing, whereas if we compare it to Oracle NoSQL database a 116B reads would cost around 287$ (99.5$ cheaper than Firestore reads pricing). Which means if Oracle is able to commercially sell these reads with such a price and gets a profit from it the actual cost is even much less, meaning when GCP takes this billing it loses almost nothing.
There should be a feature like simulating the cloud run functions or some other services to catch errors before deploying to production and in this Artificial intelligence might help to catch up errors early than an average person would.
but you need to run the code to see the errors, and the code takes google cloud levels of computing to run... you can't simulate it without running it, that's the actual halting problem...
this explains why their pricing in general is so much above classic hosting providers like hetzner etc - I don't think those cheap provider would be that customer friendly if I would forget to delete an expensive server for a long time.
Or you could just get a cloud server instance and connect to that for a fixed monthly cost that's independent of use. It might not be the most optimal for large scale applications or certain workflows, but if you're learning, testing, or just hosting small scale projects, it works perfectly fine. I have a handful of small apps that I deploy through Docker on an EC2 instance.
Something I just cannot wrap my head around is WHY you would use a cloud service in the first place if you don't need the instant scalability. Heck, you might use your MBP or a Raspberry Pi at first and when your project starts out and you need to deliver a page quickly, just use a couple of geo-located VPS instead. However I think I might be trapped in an old mindset here - I'd be really happy to hear why you would use the cloud in what I think is 95% of the use-cases. It just seems utterly expensive for what it is.
It might be because it is easier, and also can be started free. I suppose no one would want to run the database on their laptop and let it run everyday, or not anyone has a PC that can run it everyday, or not anyone had/would bought a spare device for it. Sorry for my bad English.
The reason I am always almost on my wits end when on AWS.😅 most basic thing is I always makes notes of service I started and access so that I won't forget it later on so that I don't need to see that uncanny bill.
Good idea. You still need to be careful. Behind the scene so many provisioning happens for which you may be billed. For example, if you create a managed instance group as a backend service for a load-balancer, then a network endpoint group gets created automatically behind the scene. You may delete the backend service later, but the NEG doesn't get deleted automatically.
Never ever ever hardcode your API key values in your code, even for one second. You will probably forget and check the code in. Use environment variables or cloud secret managers.
Just an addition to the topic of leaked IAM Keys: GitHub nowadays has a "scanner" which scrans every commit for known Keys (e.g. IAM) and immediately disables this key by telling AWS (this literally happens in less than a minutes) and sending you a mail that you f***ed up. I only know this for AWS but I guess that they also have this mechanism for e.g. GCP and Azure :)
5:00 I think a better term is a recursive call. Technically it is an infinite loop (since there's always a main event loop somewhere), but an infinite loop is more conventionally a while or for loop that never ends.
No it's not. A recursive call is when a function is calling itself without a termination condition, and infinite loop is when a data structure doesn't have a condition that fulfills to terminate the cycle.
I made a mistake when using AWS gamelift during my bachelor assignment two years ago: i forgot a fleet running a game instance. I got $150 bill, but after contacting them it was deleted. Very good service, I can highly recommend AWS. 👌
We had a similar issue with AWS where a hacker got hold of one of an old emplyees api keys and setup a load of lambda functions. By the time it was noticed our bill was $15,000 for just a few weeks. Thankfully in the end Amazon refunded the whole lot, but it wasn't easy and was very scary. Protect your API keys like your life depends on it and regularly switch them out and clear out unused ones.
That time I accidentally deleted a whole kubernetes cluster instead of a single node pool on Google Cloud. It was scary how easy it was to delete it automatically. Thankfully it was a test cluster and it took only 2 days to restore it completely from scratch. But my face when I realized that I did it and that there was no turning back :D
I made one in firestore. A document needed to be updated based on values in an update. I hadn't taken into account an old client, which would result in a calculation turning out to be NAN. One and a half hours later, with a SINGLE old client causing this, $40 was used. This could have escalated like a nut, if I hadn't seen it by random luck.
At a convention, I was talking to a Microsoft employee, he was apparently a higher-up. He accidentally racked up a $5,000 bill just playing around in Azure. He talked to his boys and got the bill removed. All kinda scary!
Go for lightsail VPS, cheapest VPS in the earth after vultr. AWS is indeed the cheapest unless you configure something wrong and expose everything outside
There is massive risk in using cloud so I cannot comprehend the rush to get there. If you are a startup it may be the quickest way. For established companies, you can reduce risk by having your own platforms.
That's why I want the "auto-shutdown" to prevent unintentional bills. But on the other hand, people will just abuse it and not pay. On their perspective, "charge by default, cancel later" is safer option for everyone and forces devs to be more careful.
I don't see how you'd abuse it. If you shut down your project before any cost occurs... That's similar to some free tiers like Railway which gives you X free hours per month
I burned $6000 on some azure lab machines. We had just achieved gold partner status and I reviewed the estimated cost and it said $0. But I was just in the wrong place looking... Wise by this lesson a few years later I told a colleague to be careful with his Azure subscription. He got himself an enterprise sql Analysis instance. $7000 spent there...
I've been an Azure customer for 9 years and I have NEVER ONCE jacked up an unintended bill! Very scary but if you're smart, one shouldn't worry too much but just be smart about it!
I understand your suggestion to not make infinite loops, but what if someone is just endlessly computing (with no scaling / explosion of computational complexity as described above) rather than responding to user events? To take an artificial example, let's say I'm just getting a list of prime numbers. So I do while(true) { i++; if(isprime(i)) { log(i); }}. Is there an alternative? I guess I could do batches of numbers, with human intervention in between (e.g. every million iterations, store i, wait until human says proceed), but this doesn't seem to really solve any problem. So... is there a problem with this? And if so, what's the alternative?
I remember racking up $1000 from AWS and I was sweating bullets cause I was basically trying out some things. I was relieved when AWS forfeited my bill
This is an old video but its noteworthy to add that I was in a similar situation like the startup thankfully they were reasonable enough to refund over 90% of the bill. I am now afraid of touching the cloud again. I still have depts to pay on AWS too
I got so scared that I just took down a test project that I had deployed on vercel 2 days ago for my portfolio after watching this because i remembered that it had my fire store(free tier) config exposed in front-end. I dont know if what I just did was plain stupid or what but now I'll rather do my research on it first than blindly deploying it.
I have seen USD 600,000 AWS bill over a Friday afternoon fuck up... imagine you have a few petabytes of data in like 2-4kb files on s3... not super cheap to store but okay as long as you don't really access this data much. Now imagine that you just make a small change to the storage policy that dictates that all files older than 3 months should be moved to glacier. One line change... causing billions of delete operations from s3 and billions of writes to glacier... No VMs in sight that you could stop, because it's an internal aws process. We got a discount for the fuck up, but still ended up paying like 150k
Well if you do certifications for Azure. There are parts of the curriculum that teach you how to maintain strict control over your account. How to set limits, budgets, alerts. How to minimize cost. General reasons why cloud bills go through the roof unintentionally. How to prevent such incidents. I think you should learn the system well before doing such stuff.
Not a long time ago I was exploring kubernetes and was following an Indian tutorial of how to set everything (Ec2, S3 and Route53). Within 2 hours I had a 3€ bill when I thought I was in free tier... Somehow everytime I killed an EC2 instance a new one outside of the free tier was created... It was just 3€ and AWS gave me a 3€ voucher when I explained what happened. It was enough for me to be scared enough to try again
woudlve spent 1k a month with cloud run because of cpu time billing, was able to do the same task with twice the amount of serverless functions with only a 4$ a month bill
lol exactly, a few days ago I changed a state inside useEffect and triggered an infinite render loop, it never stopped! I'm more of a C/C++ guy so I'm kinda new to web dev.
I spent 1200 USD in Azure, in roughly a month, just using it for personal training 😆😲 big mistake. I had always been afraid, and aware that it could be costly.. but after using it for some months, I thought "Oh this is not so bad, I will add some more resources"... Big mistake.
This happened to my co-worker a few months ago. He accidentally deployed a Terraform infra with hundreds of resources including Kubernetes with a minimum availability of 1000 pods + the project's deployments themselves xD Anyway, he ended up generating costs of 6500 EUR for that day :D