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)
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.