4 ms·
Not that I'd want production infra to be wiped because I went over a spending limit by $1 - but can't you setup a billing alert that goes to an alarm action to
by thoraway1010 7y ago
Not that I'd want production infra to be wiped because I went over a spending limit by $1 - but can't you setup a billing alert that goes to an alarm action to terminate all your EC2 instances as soon as the billing alert triggers? Or a lambda function that iterates through your account and deletes everything?
I'm not sure why AWS would build something like this though themselves. To stop spending money EVERYTHING must be deleted (s3 / glacier / etc). If someone in accounting loads the wrong budget amount you lose all your data.
Amazon's focus seems more on making sure your data is kept and available.
- maest 7y agoBiling alerts are not real time. - Some guy
- thoraway1010 7y agoGood point - I think they are on a 6 hour average delay from what I've seen. An area for improvement it would seem for sure.
- nucleardog 7y agoYeah this is really the only realistic way for this to work. Every workload is different and it's basically impossible for Amazon to set up a global cost limiting that would work for everyone. Trying to do so would just introduce a lot of new and non-obvious failure modes for a bunch of people. It's like your landlord made a deal that if you couldn't pay your full rent any month, you could lose access to part of the property and he'd clean it out and re-rent it until next month. Except your landlord has no idea what your actual day-to-day life looks like. Some stuff is obviously no good to take away (you need the bathroom), some stuff is seemingly obviously no good (you need the kitchen... unless you always eat out). But what about that spare bedroom? Probably fine if you're just using it to store your recycling. Not fine if you're using it as a home office. You need a understanding of the actual workload in order to figure out where costs could be reduced, and implementing rules or logic around a single workload limits everyone either to using that same thing, or not using the cost limiting.