22 ms·
For AWS you get about $0.20 per 1 million requests on Lambda. If you get it right, great. If you get it wrong then you end up doing billions of operations by m
by onion2k 6y ago
For AWS you get about $0.20 per 1 million requests on Lambda.
If you get it right, great. If you get it wrong then you end up doing billions of operations by mistake, which could cost a huge amount. That's what happened to the author of the article.
But really the first lesson you should learn in any cloud setup is Billing Alarms
Alarms only tell you that something is going wrong. They don't stop it. If your mistake is costing $1000/minute and you're an hour away from a computer you have a very expensive problem.
- gonzo41 6y agoYou can trigger events from alarms. And Lambda's only last 15 minutes. So still cheaper than 75K :D.
- welkie 6y agoThat's not a bad idea. You could set it up to delete all Lambdas (assuming you've got a CI/CD system capable of redeploying them quickly later) if the billing goes over. Of course, this may hurt you more because of the outage it would cause. Up to you really.
- jjk166 6y agoSo you're taking code that you haven't validated locally to see what resources it uses, you're putting this up on the cloud to test it, then you are immediately going to the middle of nowhere without your laptop/phone/etc, and you can't arrange for a coworker or friend to pull the plug for you if something goes wrong?
- patrickaljord 6y ago> and you can't arrange for a coworker or friend to pull the plug for you if something goes wrong? This is HN, many of us are solo founders with no coworkers or employees. Also how could a "friend" pull the plug? If it was a physical server running in your house maybe, otherwise you can't really give them access to your AWS account with all your private clients data in there.
- jjk166 6y agoIf you don't have anybody who can monitor your test, and you're not monitoring your test, why are you doing a test? As for having a non-employee pull the plug, set up an IAM user with permission to access the test instance
- WrtCdEvrydy 6y ago> you're not monitoring your test, why are you doing a test? Agile. Bringing you bankruptcy at the speed of cloud.
- jschwartzi 6y agoIf I'm the only developer on a project and I really need to get to market I might do just that. I sometimes do day hikes on weeknights so this is actually a likely scenario for me.
- jjk166 6y agoDo you go hiking alone without your phone? That seems dangerous. And why would you start a test if you won't be there to see the results of the test? Seems more sensible to either leave after you've run the test or wait to do so until you get back.
- jschwartzi 6y agoYeah pretty frequently. It's not dangerous at all. Maybe if I was climbing alone it would be.
- jschwartzi 6y agoIf a test is going to take more than an hour then I'm not going to sit around after work waiting for it to finish.