4 ms·
What makes you say Lambda is more expensive than things like EC2? Obviously lambda is a hammer, not a swiss army knife - you shouldn't shoehorn it into your ap
by scrollaway 10y ago
What makes you say Lambda is more expensive than things like EC2?
Obviously lambda is a hammer, not a swiss army knife - you shouldn't shoehorn it into your app just because it's the new tech on the block. But the use case isn't niche at all.
We're using lambda for our service to ingest and process Hearthstone replays. An HTTP POST is sent to the API gateway, this triggers a lambda which parses a 0.5-2MB file, scrapes the data in it and stores data in the db + converts it to another format. The whole process takes 3-6 seconds. Lambda lets us easily scale to dozens of requests per second without having to worry about anything other than the DB server. Our frontend/app servers don't need to be touched.
The alternative would be to provision and manage a lot of EC2 instances to handle the load. We'd have to worry about provisioning them dynamically so that it's economically viable. We'd have to manage the load balancing ourselves. Lambda's been a huge time saver.
PS: Let it be known that Lambda only supports python 2.7, not python 3, and that really frickin sucks. Get your shit together, Amazon.
- emjr 10y ago"Let it be known that Lambda only supports python 2.7, not python 3, and that really frickin sucks. Get your shit together, Amazon." Node 4 support came, what, a month ago? It's pretty ridiculous.
- scrollaway 10y agoI specifically don't understand the Python 3 situation. They support Python 2, it can't be that complicated to have a separate Python 3 runtime.
- joobus 10y agoThere is no significant benefit to python 3 over python 2.
- brianwawok 10y agoExcept that it is the way forward and many people choose to write python3 compatible code.
- scrollaway 10y agoYou're wrong, and it's irrelevant anyway. Our app is in Python 3. Having to support Python 2 just because lambda doesn't support 3.x is a pain.
- nameless912 10y agoUnicode....? I mean, that's reason enough. Python 2's string processing suuuuuuucks.
- timlyo 10y agoAsyncio? https://docs.python.org/3/library/asyncio.html https://docs.python.org/3/library/asyncio.html
- rckclmbr 10y agoDo you leave your database server publicly open (but password protected obviously), or can you use IAM policies for this as well?
- scrollaway 10y agoA quick google search of more 3-letter-acronyms than there are in the US government yields this: - https://docs.aws.amazon.com/lambda/latest/dg/vpc-rds.html https://docs.aws.amazon.com/lambda/latest/dg/vpc-rds.html - https://docs.aws.amazon.com/lambda/latest/dg/access-control-identity-based.html https://docs.aws.amazon.com/lambda/latest/dg/access-control-...
- SwellJoe 10y agoI've got (virtual) servers all over the place. I run my tiny little "needs a minute" tasks on one or more of those. It's nice, I guess to make it a wholly isolated thing, but I rarely actually want to go to the trouble to design it to be isolated. My little jobs often need at least some of the rest of my production environment to be available (database, logs, libs, something). Making a Lambda thing just for those things seems like something I'd rarely want to go to extra effort for. But, if building on a very large scale with strict isolation requirements for your individual tasks it would make sense. Which is the niche I'm talking about; maybe it's just bigger than I assume it is.