aws_apigateway_method cost estimation
An HTTP verb (GET, POST, etc.) on a REST API resource. The method definition is free. The REST API it belongs to bills $3.50 per million requests plus data transfer, and optional caching adds $0.02 to $3.80 per hour.
The aws_apigateway_method resource attaches an HTTP verb to a resource path in a REST API. Defining GET /orders or POST /users costs nothing. Methods, along with their integrations and method responses, are configuration objects that shape how requests are routed and transformed. AWS does not bill per method.
The billing happens at the REST API level, per request. Amazon API Gateway REST APIs charge $3.50 per million API calls for the first 333 million requests per month in us-east-1, dropping to $2.80, $2.38, and $1.51 per million at higher tiers. Every invocation of every method counts, including OPTIONS preflight calls if CORS is enabled, so a chatty single-page app can generate far more billable requests than the number of user actions suggests. On top of request charges you pay data transfer out at standard EC2 rates (around $0.09/GB for the first 10 TB), which matters for endpoints returning large payloads.
The expensive optional add-on is API caching, configured on the stage but driven by how your methods behave. A dedicated cache instance bills per hour regardless of hit rate: $0.020/hour for 0.5 GB up to $3.80/hour for a 237 GB cache. A 6.1 GB cache at roughly $0.20/hour is about $146/month whether or not your methods benefit from it, so enable caching only where read-heavy methods actually reduce backend load.
There is an important cost fork here. REST APIs (aws_api_gateway_rest_api, using this method resource) are the more expensive tier. HTTP APIs (aws_apigatewayv2_api with aws_apigatewayv2_route) cost $1.00 per million requests, roughly 70 percent cheaper, but drop some REST-only features like request/response transformation, API keys with usage plans, and per-method caching. If your methods are simple proxies to Lambda or a backend, moving to an HTTP API is often the single largest API Gateway saving available.
A gotcha: authorizers attached to methods can add cost indirectly. A Lambda authorizer invokes a function on (uncached) requests, so each protected method call also triggers Lambda billing. Enable authorizer result caching to avoid paying for an authorizer invocation on every single request.
c3x flags aws_apigateway_method as free and attributes request, data transfer, and cache cost to the parent REST API and stage.
Terraform example
A minimal but realistic configuration that C3X can estimate.
resource "aws_api_gateway_rest_api" "main" {
name = "orders-api"
}
resource "aws_api_gateway_resource" "orders" {
rest_api_id = aws_api_gateway_rest_api.main.id
parent_id = aws_api_gateway_rest_api.main.root_resource_id
path_part = "orders"
}
resource "aws_api_gateway_method" "get_orders" {
rest_api_id = aws_api_gateway_rest_api.main.id
resource_id = aws_api_gateway_resource.orders.id
http_method = "GET"
authorization = "AWS_IAM"
}
resource "aws_api_gateway_integration" "get_orders" {
rest_api_id = aws_api_gateway_rest_api.main.id
resource_id = aws_api_gateway_resource.orders.id
http_method = aws_api_gateway_method.get_orders.http_method
integration_http_method = "POST"
type = "AWS_PROXY"
uri = aws_lambda_function.orders.invoke_arn
}Pricing dimensions
What you actually pay for when you provision aws_apigateway_method.
| Dimension | Unit | What's being charged |
|---|---|---|
| Method definition | free | Defining methods, integrations, and method responses on a REST API resource carries no AWS charge. $0 (free) |
| REST API requests | per million requests | The parent REST API bills for every method invocation, tiered by monthly volume. Includes CORS preflight OPTIONS calls. $3.50 per million (first 333M) in us-east-1 |
| API cache instance | per hour | Optional dedicated cache on the stage bills per hour by size regardless of hit rate. $0.020/hour (0.5 GB) to $3.80/hour (237 GB) |
| Data transfer out | per GB | Response payloads leaving AWS are billed at standard data transfer rates. $0.09/GB for the first 10 TB in us-east-1 |
Optimization tips
Common ways to reduce aws_apigateway_method cost without changing the workload.
Move simple methods to an HTTP API
About 70 percent on request chargesIf your methods are straightforward Lambda or HTTP proxies, an HTTP API (apigatewayv2) charges $1.00 per million requests versus $3.50 for REST. That is roughly 70 percent off request cost with no code change to your backend.
Cache authorizer results
A Lambda authorizer on a method invokes a function on every uncached request, adding Lambda cost per call. Setting an authorizer TTL caches the decision and avoids paying for an authorizer invocation on every request.
Enable caching only for read-heavy methods
$146/month per avoided 6 GB cacheAPI caching bills per hour whether or not it helps. Turn it on selectively for high-traffic GET methods that hit expensive backends, and skip it for write methods and low-traffic endpoints.
Reduce CORS preflight volume
Every OPTIONS preflight is a billable request. Setting a long Access-Control-Max-Age lets browsers cache the preflight, cutting the request count for CORS-heavy single-page apps.
FAQ
Is defining an API Gateway method free?
Yes. Methods, integrations, and method responses are configuration and cost nothing to define. You pay per request at the REST API level, plus data transfer and any optional cache instance on the stage.
Why is my REST API request bill higher than my user activity?
CORS-enabled endpoints generate an OPTIONS preflight request before the real call, and both are billable. A single user action can produce two or more API Gateway requests. Caching preflights with a long max-age and consolidating calls reduces the count.
Should I use a REST API or an HTTP API?
Use an HTTP API when your methods are simple proxies and you do not need request/response transformation, usage-plan API keys, or per-method caching. It is about 70 percent cheaper per request. Use a REST API when you need those richer features, which this method resource supports.
Does API caching bill even when it is not helping?
Yes. The cache is a dedicated instance billed per hour by size, independent of hit rate. Enable it only where read-heavy methods measurably reduce backend load, and pick the smallest size that holds your hot keys.
Related resources
Estimate this resource in your own Terraform
Free, open source, no API key. C3X parses your Terraform and shows line-item cost for every resource, including aws_apigateway_method.