1) Lambda costs were shown as actually 50 cents for all this. 2) API Gateway was the balance of the cost, and actually isn't needed in this customer's use case. Lambdas can be placed behind application load balancers which are significantly less expensive.
Author also mentions other downsides such as "vendor lock-in," however his lambdas were written in NodeJs and it would be trivial to move his code to some other NodeJs delivery mechanism such as Fargate or ECS cluster.
The benefit here is his deployment with the ServerLess framework got him his MVP very quickly on a very scalable environment with minimal management.
It is convenient in several use cases, but for an endpoint or even an entire API that is going to receive a lot of load, managing servers is the more economical approach.
If you need to get a one-off endpoint built that won't receive any significant amount of load, I think a serverless solution is great. But I wouldn't use it as my primary API architecture. Like most things in tech, there's no silver bullet. Context matters, and the best approach depends on many factors.
I still recall this article by the creator of ipify on how he's able to receive upwards of 30 billion requests per month on Heroku for a fraction of the cost of API gateway: https://blog.heroku.com/scaling-ipify-to-30-billion-and-beyo...
Those API endpoints took me about a day to deploy using serverless deployment tools. They economically scale between extremely varied workload requirements. There are no complaints on my end.
In EC2, which is not cheap at all, that's between the monthly cost of one m2.2xlarge and m3.2xlarge instance, or two m2.xlarge instances, or 3 t3.large, or 7 t3.medium.
In other words, you can operae a small cluster on AWS for that price tag.
I find it amusing that your examples to which one could move the project and avoid “vendor lock-in” are both from the same vendor as Lambda.
I get the point that it’s not Lambda specific outside the entry point, it’s just funny that the presented alternatives are still cutting a check to the same vendor.
The trade off with API Gateway is around 5 million requests (I wrote an article on it: https://ldoughty.com/2019/12/comparing-aws-api-gateway-to-lo... )
ALB is probably the best solution > 5-6 million and up.. or perhaps HTTP API Gateway between 5-6 and 15 million... But it needs to be near 20 million requests/month before ALB is the "best" solution (though there are still some other considerations that might factor in if your involving a lot of AWS Data transfer which is waived when you are not binding to a VPC, which ALB requires)
That said, my gut says there's a good chance that since the author is surprised at the rate of requests, there's almost certainly an optimization opportunity that wouldn't even take much effort.
That's a really nice advantage for starting a new project where you're confident in unit economics but have unknown scale.
The $0 argument is also flowed because $4 is a fixed cost for unlimited $0 to $2000 solutions through hedging. If you have 10 solutions, what's the likelihood of all of them still doing $0, or at the very least below $4?
The unit economics argument is likewise hard to see in practice, because we'd be talking quite different numbers on a per-unit cost with Lambda vs. without, which may easily make the difference between making a profit or taking a loss, especially if it's a lifestyle business we're talking about.
It is very expensive. Very. No need to ignore this fact. You can get a VM with 2 vCPU and 2GB of RAM for that amount with some cloud service providers like Hetzner.
I’m not saying this example isn’t expensive. But you didn’t post an apples to apples.
We're not in 1990 anymore. Nowadays all deployments are automatic and ephemeral. I have multiple services up and running with zero downtime for close to a year in a single VM instance that I haven't intervened directly since I launched it, and during that time I lost track of how much time I had to spend fiddling with AWS lambdas and AWS API Gateways.
So Hetzner's CX11 instances, that go for €3.01/month with unlimited bandwidth, don't exist in your world?