| > and I can't really see any reasons it couldn't work. You’re assuming the existence of a function which can extrapolate the daily/monthly/etc costs. If I upload a 10GB file at $0.10/gbmo, how much will it cost me? We have no idea because we don’t know how long it will be up there. We have a process that downloads and streams massive reports into S3, then a process is immediately kicked off to handle processing and importing. As soon as that completes, the files are deleted. So we’re paying about 0.04 months of storage every month. The naive solution is estimating 1.00. You’re off by a factor of ~24. We could... not handle that. Now we’re in a situation where we’re consistently spending $100/mo on storage, set a liberal $150 budget and immediately everything breaks. We actually needed to set a $2400 budget! Expecting a $100 bill and getting a $2400 bill some month when something goes wrong is as good as doing nothing. You’re also going to need to account for the interaction of every single object in a bucket and the lifecycle rules set which is an absolutely ridiculous amount of overhead. Now extend this to... literally every one of the seemingly bazillion AWS services. The only cap that’s going to be easy and realistic to implement without a crystal ball is a hard cut-off once you’ve actually accrued the charges, and a “shut down all my servers, delete all my data, and just close my account” cap is useful to almost no one. If you want useful caps they need to be aware of your workload. The best person to implement those is you. The tools are there. |
If I estimate I'm going to need to spend $400 a month on my bill, then I might set a limit of $800, send me an email warning when I'm getting close, I'll go in and work out why I'm consuming much more than I expected. If I don't hit the "let me exceed my billing limit this month" button then stop the service. (but don't delete any data, I'm not sure why so many commenters seem to think this is a necessary step).
Amazon is capable of calculating how much to charge you every month, so they're capable of doing this too. No fancy estimation required.
==================================
So under your example - I upload my 10gb file, but some bug in my processing code means it doesn't get deleted and sits there for a while. Maybe I don't notice and it sits there for a few days instead of a few seconds, but Amazon sends me an automatic email because my usage this month so far is X% higher than the average of my last Y months.
Ideal scenario: I go in, investigate, delete the file and temporarily increase my billing cap just for this month.
Not great, but okay scenario: I don't notice the email, a few days later and I'm at ~2x my previous months bill (or whatever limit I've set up), amazon automatically starts returning 402s when I try to access my storage service. I am happy because this is still much better than getting a bill for 10x my previous amount at the end of the month instead.