My notes from deciding against AWS Lambda
jesseduffield.comGreat high level doc on Lambda.
Personally, I love this service. My most critical personal software runs on Lambda. It's insanely cheap and easy to deploy (with Serverless.io, though i would like to move to Open tofu at some point).
Testing is difficult if you rely on Lambda's out of the box runtimes. I recommend using Docker images with the Lambda RIC built in. Way easier to test (with the Lambda RIE) and tons more flexibility.
If you use your own Docker images, you lose one of the main benefits of Lambda, which is that AWS will take care of automatically patching all the security vulnerabilities in the infrastructure platform. My goal is always to outsource as much of the code as possible to AWS, and implement myself as little as possible.
Complex, expensive, slow to start, hard to test, massive investment in specialist cloud personnel needed, inflexible, limitations that self hosting doesn’t have, total configuration including IAM and N other AWS services all forming a complex and messy bowl of spaghetti, nickel and dime billed for every bit of data going anywhere all topped off with 9 cents per gigabyte egress.
Every AWS Lambda project I worked on spent at least as much time working on AWS as on writing application code ….. in some cases much more ….. the majority of the teams work was “programming the machine” (working in AWS itself).
What’s not to love about AWS?
Lambda requires an experience and intent to get right, and when it is right it’s an obvious win.
The cost of innovation and experimentation is basically zero —- build it and if they don’t come just leave it running for no cost and maybe they will. Contrast this with other options, and maybe feel the pain of online game developers who have fewer options.
I've been using SST to deploy my lambdas and it's solved most of the issues mentioned in the article. It's a higher level abstraction over cdk/cloud formation that gets rid of a lot of common boilerplate when messing with aws infra. Cold starts and cost are obviously unaffected but deploying in multiple environments and local testing is super easy
SST is the best serverless/lambda dev/deploy experience out there right now (at least for NodeJS/TS).
I really wish it supported Bref (PHP) out of the box as well because I really enjoy the way SST does stuff but TS is the best supported.
After using Lamda and then migrating away from it, my conclusion is that I'll only use lambdas for sysadmin-like things or for spikey-workloads where the cost savings is practically more than an engineer's salary because they're not worth the headache otherwise.