Hacker News new | ask | show | jobs
by carlsborg 2878 days ago
> I've seen just API Gateway costing more than entire infrastructure costs of similarly sized websites.

Do you mean Api Gateway + the lambdas?

API Gateway is $3.50 per 1 million API calls received plus data transfer ($0.09 per GB or $90 per Terrabyte). What kind of API were they serving that was racking up those large bills?

Typically you would serve static content off s3 + cloudfront, and just the API off the API gateway/lambdas.

2 comments

A mid sized web site with 5000RPM would be 219 million of requests per month: so 766 USD/month just for API GW, without data transfer, lambda, static/cdn or DB costs.
If you expect a steady load of hundreds of requests per second - maybe API Gateway + Lambda is not the best solution. The use-case in the article did not have such load targets. Lambda is not a silver bullet..
In this scenario, the savings come from time + resources spent on configuration management, system admin and troubleshooting, and server security.

Also if you have servers you are probably auto-scaling redundant instances in multiple availability zones and then getting that high CPU utilization is unlikely.

I guess this number goes down drastically if you throw in CloudFront.
Serverless doesn't necessarily mean Lambda. You can use Cloudflare Workers and pay $0.50/million requests flat.