Hacker News new | ask | show | jobs
by tomerico 2269 days ago
Why is there no way to set a limit on billing on AWS? Especially for cases like this, where killing testing instances does not have a dramatic negative effect...
2 comments

Agreed. The simple solution is an expenditure cap. Why can't Amazon implement one? The fear of it going wrong like this would make me keep away from AWS forever.
Wait, is there really not one on AWS? I thought this was the #1 most important feature on any such cloud systems.

It's the very very first thing I set when setting up my GCloud hobby project. I was like, this is fun and all, but I don't care about this enough so I limited it to 3$ per day and 50$ per month. If it goes above, I'm very happy to let it die, and it also gives me a warning so I know something is up. The 2 times it triggered, there was something I managed to fix so the tool is still up and running costing pennies.

I got pegged to the wall by aws once on a hobby project. $1500 racked up in two months. Apparently I left a snapshot in some kind of instant restore state to the tune of $0.75/hr. I used the instance for 2 days, and then shut everything down. Or at least thought I did.

The account I did it on was tied to my "junk" email, so I didn't catch amazon banging on my door saying my payment info needed to be updated. Well until I did happen upon one of the emails. Nearly had a heart attack.

Talked to aws support and they full refunded me. Very very kind of them, but now I'm terrified to touch anything aws.

I don't think an expenditure cap is so simple. Exactly what happens when you hit it? If you have, let's say, 3 RDS DBs and 20 EC2 instances running and a bunch of stuff in S3 and a few dozen SQS queues and a few DynamoDB tables etc, and your account goes over the limit, how do you decide which service you want to automatically cut?
So 90% of the time I hear these horror stories it's a test/dev account where deleting everything is preferable to getting a bill.

I also don't understand why everyone is assuming

"if I hit threshold X do A, if I hit threshold Y do B" where A and B are some combination of shutting down and deleting resources,

is as difficult as solving NP complete.

> Why can't Amazon implement one?

Greed, I'm assuming.

Nowadays quotas give you some safety net. For example you usually have to request more than one GPU to avoid burning money that way, or more than say 32 instances. It should not be possible for a new account to spawn 1k VMs overnight.

The problem with billing is that often these charges are not calculated instantly, and others are not trivial to deal with. For example what happens if you go over budget on bandwidth or bucket storage, but still within quota? What do you kill? Do you immediately shut down everything? Do you lose data? There are lots of edge cases.

You can normally write your own hooks to monitor billing alerts and take action appropriately.

There are service limits on new accounts per region - 20 EC2 instances. These require a ticket lodged to over-ride.
You can still burn an awful lot of money with 20 EC2 instances.
... put a credit card on the account that only has a $1000 limit. Or better yet, a prepaid one.
In this case wouldn't it just cause Amazon to send you a notice that the $10k overnight charge was declined and you should enter another payment method?