To call a Lambda function over HTTP, something has to receive the request first. In most tutorials that is Amazon API Gateway. It is billed per request, regardless of how long the function runs, and for short functions that means the gateway can cost more than the function behind it.
This is the fourth article in our series on the costs that serverless cost estimates leave out, after the free tier, data transfer and logging.
What the options cost
These are the list prices in US East (N. Virginia) on November 22, 2026:
| Front door | Price |
|---|---|
| API Gateway REST API | $3.50 per million requests for the first 333 million a month, less beyond |
| API Gateway HTTP API | $1.00 per million requests for the first 300 million a month, then $0.90; metered in steps of 512 KB, so a request of 1.2 MB counts three times |
| Lambda function URL | no charge beyond the function itself |
| Application Load Balancer | $0.0225 per hour, about $16.40 a month, plus capacity units for the traffic |
Lambda itself charges $0.20 per million requests. The REST API charges more than seventeen times that.
An example
Take the API function from the previous article: 10 million requests a month, 100 ms each, at 512 MB. Compute and requests cost $10.33 a month.
Behind a REST API, the gateway adds $35.00, more than three times the function. Behind an HTTP API it adds $10.00, about as much as the function. With a function URL it adds nothing.
The shorter the function, the larger the gateway’s share. A function that runs 20 ms instead of 100 ms costs about a fifth in compute, but the gateway costs exactly the same.
What you get for the difference
The three options are not interchangeable, so the question is which features an API actually uses.
- REST APIs have the most features: request validation, response caching, usage plans with API keys, AWS WAF, private APIs reachable only from a VPC, and edge-optimized endpoints. If an API sells access through API keys, or needs WAF rules in front of the functions, that is worth the price.
- HTTP APIs cover what most APIs need: routes to several functions, JWT authorizers (for example with Amazon Cognito), CORS, custom domains and throttling. For a typical backend of a web or mobile app they are enough, at less than a third of the price.
- Function URLs give a single function its own HTTPS endpoint, either public or protected with IAM, with CORS settings. There is no routing across functions, no authorizer for user tokens and no custom domain. For webhooks, or for functions behind Amazon CloudFront, which adds the domain and caching, they are often all you need.
- An Application Load Balancer has a fixed price of about $16 a month before any traffic, plus capacity units. That pays off against an HTTP API only at high volumes, and against a REST API earlier.
Our own backend is an example of the middle way: Dukehoff Cloudhopper, our Java framework, generates an HTTP API for functions with HTTP triggers, and CloudFront serves the API on the website’s domain.
Costs around the gateway
A few charges come with any of these options and don’t show up in the price per request:
- Lambda authorizers are Lambda invocations of their own. Without caching, every API request runs two functions. Cache the authorizer’s result (for up to an hour), or use a JWT authorizer, which doesn’t call a function at all.
- Caching in REST APIs is billed per hour as long as the cache exists, from $0.02 an hour for the smallest size, whether it is used or not.
- Data transfer out is billed per GB, as described in the second article, on top of the price per request.
Summary
For short functions with many requests, the front door can be the largest part of the bill. Check which features of a REST API you actually use. If the answer is routing and authentication, an HTTP API does the same for less than a third of the price, and for single functions a function URL costs nothing at all.
The Cloudhopper app does this check for you. It finds the API Gateway APIs in front of your Lambda functions and shows each function’s share of their cost next to compute, requests and logs. When a REST API uses none of the features only REST APIs have, it recommends switching to an HTTP API, with the savings in dollars. When a Lambda authorizer runs on every request because its results aren’t cached, it says so, with what the authorizer costs.
