API Gateway HTTP API vs REST API: Every Feature Difference, Pricing ($1.00 vs $3.50), Timeouts, the Payload 2.0 Lambda Trap, and Which to Choose

Logeshwaran
—

HTTP API vs REST API in Amazon API Gateway: both put an HTTPS endpoint in front of Lambda functions or other backends, but an HTTP API is the lean, cheaper option, $1.00 per million requests in US East against $3.50 for a REST API, with built-in JWT authorizers and automatic deployments, while a REST API has the full feature set: API keys and usage plans, per-client throttling, request validation, caching, AWS WAF, private endpoints, X-Ray tracing, canary releases and response streaming. Choose an HTTP API unless you need one of those REST-only features. The catch nobody mentions until it bites: an HTTP API sends Lambda a different event by default (payload format 2.0), so a function written for a REST API crashes on its first request with KeyError: 'httpMethod', and repeated query parameters arrive as one comma-joined string. To create an HTTP API for a Lambda function, one command is enough: aws apigatewayv2 create-api --name orders --protocol-type HTTP --target FUNCTION_ARN.

Ethan built the shop's first API, a small endpoint for the order-tracking page, as a REST API, because that was what the tutorial used. A year later he looked at the bill, saw the per-request price, and moved it to an HTTP API in an afternoon. The new endpoint returned 502 for every request. Nothing was wrong with the API. The Lambda function was still reading event["httpMethod"], a field that HTTP APIs do not send.

⚡ Quick Answer

• HTTP API: cheaper (about 70 percent less), simpler, JWT authorizers built in. What you get.

• REST API: API keys, usage plans, WAF, caching, validation, private endpoints, X-Ray. What only REST has.

• Full feature table: side by side · pricing with examples · timeouts and limits.

• Moving from REST to HTTP? Fix the Lambda event first. Payload format 1.0 vs 2.0.

Which one to choose · Migration steps · Exam tips · FAQ.

This guide compares API Gateway's HTTP APIs and REST APIs feature by feature, with current prices, the limits that differ, a worked cost example, the Lambda event difference that breaks migrations (tested with the official sample events), and a decision checklist. If API Gateway itself is new to you, what Amazon API Gateway is explains routes, stages and integrations first.

🧭 NEW HERE? READ THESE FIRST

New to API Gateway? These pages explain the basics this guide uses:

💡 Both are "REST" in the everyday sense. The names describe two products, not two architectures.

HTTP API vs REST API: the short version

The names confuse everyone, so start there. Both products serve RESTful APIs over HTTPS. "REST API" is API Gateway's original, full-featured product (sometimes called v1, because its control-plane API is apigateway). "HTTP API" is the newer, lighter product (v2, managed through the apigatewayv2 API, which also handles WebSocket APIs). The difference is not REST versus something else; it is a feature-rich product against a cheap, fast, minimal one.

  • HTTP API: proxy requests to Lambda or HTTP backends, authorize with JWT (Cognito or any OIDC provider), IAM or a Lambda authorizer, CORS, custom domains, automatic deployments. Nothing more, at a lower price.
  • REST API: everything above (except native JWT authorizers and Cloud Map integrations) plus API management (API keys, usage plans, per-client throttling, a developer portal), request validation and body transformation with mapping templates, caching, AWS WAF, resource policies, private and edge-optimized endpoints, X-Ray, execution logs, canary releases, mock integrations and response streaming.

For a typical "Lambda behind an HTTPS endpoint" app, an HTTP API does everything you need. You move up to a REST API the moment you need one of its specific features, and the list of those is short and concrete.

HTTP API vs REST API feature comparison

FeatureREST APIHTTP API
Price per million requests (US East, first tier)$3.50$1.00 (metered in 512 KB increments)
Endpoint typesEdge-optimized, Regional, PrivateRegional only
IAM, Lambda authorizersYesYes
CognitoYes (Cognito user pool authorizer)Yes, through a JWT authorizer
Native JWT authorizerNo (use a Lambda authorizer)Yes
Resource policiesYesNo
AWS WAFYesNo
Mutual TLSYesYes
Client certificates for backend authenticationYesNo
API keys, usage plans, per-client throttlingYesNo
Developer portalYesNo
CachingYes (from $0.02 an hour for 0.5 GB)No
Request validation, body transformationYesNo (parameter mapping only)
Automatic deploymentsNoYes
Canary deployments, custom gateway responses, test invokeYesNo
X-Ray tracing, execution logsYesNo (access logs and metrics only)
Private integrations (VPC link)NLB and ALBNLB, ALB and AWS Cloud Map
Mock integrations, response streamingYesNo
Lambda event formatPayload format 1.02.0 by default (1.0 selectable)

What an HTTP API gives you

HTTP APIs were designed for the common case: an HTTPS front door for Lambda functions and HTTP services, at the lowest price and latency. What you get, and what makes them pleasant to use:

  • JWT authorizers built in. Point the authorizer at your Cognito user pool or any OpenID Connect issuer, set the audience, and API Gateway validates tokens before your function runs, with no Lambda authorizer to write. The Cognito authorizer 401 guide covers the token mistakes that cause rejections.
  • Automatic deployments. The $default stage can deploy every change at once; no "Deploy API" step to forget.
  • Simple routing. Routes like GET /orders/{id} or a catch-all $default route, with greedy path variables.
  • CORS as a setting, not something you assemble from mock integrations and gateway responses.
  • Cloud Map integrations for services discovered through AWS Cloud Map, which REST APIs cannot do.
  • A simpler Lambda contract (payload format 2.0), where returning plain JSON is enough; see below.

What only a REST API can do

Each REST-only feature is a reason to pay the higher price, and each maps to a concrete need:

  • You sell or meter API access: API keys, usage plans, quotas and per-client throttling, plus a developer portal for consumers.
  • You need AWS WAF on the API itself (rate-based rules, managed rule groups, IP sets). With an HTTP API, you would put CloudFront with WAF in front instead.
  • You need a private API reachable only from your VPCs through an interface endpoint, or a resource policy limiting callers by account, IP range or VPC endpoint.
  • You want API Gateway to reject bad requests before they reach your code (request validation against a JSON schema) or to reshape requests and responses with mapping templates, including direct integrations with services like DynamoDB or SQS.
  • You need caching at the API layer, X-Ray tracing through the gateway, execution logs, canary deployments, or response streaming for long, incremental responses.
  • You need an edge-optimized endpoint, which routes callers through CloudFront edge locations to a single Regional API.

If none of these lines describes your project, the extra $2.50 per million requests buys you nothing. API Gateway 429 throttling explains how account, stage and usage-plan limits interact on REST APIs.

HTTP API vs REST API pricing

Prices from the API Gateway price list for US East (N. Virginia), October 2026:

Monthly requestsREST APIHTTP API
First 300 million (HTTP) / 333 million (REST)$3.50 per million$1.00 per million
Next tiers$2.80 (to 1 billion), $2.38 (to 20 billion), $1.51 beyond$0.90 beyond 300 million
Free tier1 million calls a month for 12 months (legacy free tier)1 million calls a month for 12 months (legacy free tier)
ExtrasCache from $0.02 per hour (0.5 GB) to $3.80 per hour (237 GB); developer portal from $125 a monthNone

Two details change the math. HTTP API requests are metered in 512 KB increments, so a 1.2 MB upload counts as three requests; REST API requests are counted once each. And both add the usual data transfer out charges. For Ethan's order-tracking endpoint, about 12 million requests a month of small JSON:

REST API:  12 million x $3.50 per million = $42.00 a month
HTTP API:  12 million x $1.00 per million = $12.00 a month
Saving:    $30.00 a month (71 percent), $360 a year, for the same Lambda function

At 500 million requests a month the gap grows in dollars: a REST API costs 333 million requests at $3.50 plus 167 million at $2.80, or $1,633.10, against an HTTP API's 300 million at $1.00 plus 200 million at $0.90, or $480.00. The REST cache, if you add one, is billed every hour whether or not it is hit: the smallest cache is $0.02 an hour, about $14.60 a month.

Timeouts, payload size and other limits that differ

LimitREST APIHTTP API
Integration timeout50 ms to 29 seconds; can be raised above 29 s for Regional and private APIs (may lower your Region throttle quota); not for edge-optimizedUp to 30 seconds, cannot be raised
Payload size10 MB10 MB
Request line and headers20,480 bytes (8,000 for header values on private APIs)10,240 bytes
Routes / resources300 resources per API (adjustable)300 routes per API (adjustable)
Account throttle10,000 requests per second with a 5,000 burst per account per Region, shared by REST, HTTP and WebSocket APIs (2,500 / 1,250 in some newer Regions)

The timeout row decides some migrations on its own. If your REST API depends on an integration timeout above 29 seconds (a quota increase on a Regional API), an HTTP API cannot match it: 30 seconds is its ceiling. For anything slow, the better pattern on either type is to return quickly and finish the work asynchronously; the 504 timeout guide shows how.

The Lambda event: payload format 1.0 vs 2.0

This is the part that breaks migrations. A REST API always sends Lambda payload format 1.0. An HTTP API sends format 2.0 by default (you can choose 1.0 per integration). The two events have different shapes. Running the official sample event of each format through two handlers, one written the REST way and one that handles both, gave:

event-v1.json -> rest_style_handler: {"method": "GET", "hello": "value"}
event-v1.json -> portable_handler: {"method": "GET", "path": "/my/path", "cookies": 0, "qs": {"parameter1": "value1", "parameter2": "value"}}
event-v2.json -> rest_style_handler: KeyError: 'httpMethod'
event-v2.json -> portable_handler: {"method": "POST", "path": "/my/path", "cookies": 2, "qs": {"parameter1": "value1,value2", "parameter2": "value"}}

Behind an API, that KeyError becomes a failed invocation and the client sees an error instead of data, which is exactly what Ethan's migrated endpoint did. The differences that matter:

What you needFormat 1.0 (REST API)Format 2.0 (HTTP API default)
HTTP methodevent["httpMethod"]event["requestContext"]["http"]["method"]
Pathevent["path"]event["rawPath"] (without a custom domain's API mapping)
Repeated query parametersLast value in queryStringParameters, all values in multiValueQueryStringParametersOne comma-joined string: "value1,value2"
Repeated headersmultiValueHeaders listComma-joined in headers; no multiValueHeaders
CookiesInside the Cookie headerA separate cookies list
Header namesAs sentLowercased
ResponseMust return statusCode, headers, bodySame, or just return JSON: API Gateway infers 200, application/json

A handler that works behind both, in Python:

import json

def handler(event, context):
    if event.get("version") == "2.0":                     # HTTP API, payload format 2.0
        method, path = event["requestContext"]["http"]["method"], event["rawPath"]
        cookies = event.get("cookies", [])
    else:                                                 # REST API, payload format 1.0
        method, path = event["httpMethod"], event["path"]
        cookies = [c.strip() for c in (event.get("headers") or {}).get("Cookie", "").split(";") if c.strip()]
    qs = event.get("queryStringParameters") or {}
    return {"statusCode": 200, "headers": {"content-type": "application/json"},
            "body": json.dumps({"method": method, "path": path, "cookies": len(cookies), "qs": qs})}

The other way out is to set the HTTP API integration's payload format version to 1.0, which makes the new API send the old event: the fastest fix for a migration, at the cost of keeping the older, more verbose format. Web frameworks running on Lambda through an adapter (Mangum, Serverless Express, Lambda Web Adapter and similar) usually handle both formats already. The 502 response-shape guide covers the response side in detail.

Example: the same Lambda API as an HTTP API and as a REST API

The quickest way to feel the difference is to create both for one Lambda function. An HTTP API has a "quick create": one command builds the API, a $default route, the Lambda integration and an auto-deploying stage:

aws apigatewayv2 create-api --name orders-http --protocol-type HTTP \
  --target arn:aws:lambda:us-east-1:111122223333:function:orders

# add a Cognito JWT authorizer (no Lambda authorizer needed)
aws apigatewayv2 create-authorizer --api-id a1b2c3 --name cognito --authorizer-type JWT \
  --identity-source '$request.header.Authorization' \
  --jwt-configuration Audience=1example23456789,Issuer=https://cognito-idp.us-east-1.amazonaws.com/us-east-1_ExaMPle1

The REST API equivalent takes a resource lookup, a method, an integration and an explicit deployment:

aws apigateway create-rest-api --name orders-rest --endpoint-configuration types=REGIONAL
aws apigateway get-resources --rest-api-id r1                 # find the root resource id
aws apigateway put-method --rest-api-id r1 --resource-id root1 \
  --http-method ANY --authorization-type NONE
aws apigateway put-integration --rest-api-id r1 --resource-id root1 --http-method ANY \
  --type AWS_PROXY --integration-http-method POST \
  --uri arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-1:111122223333:function:orders/invocations
aws apigateway create-deployment --rest-api-id r1 --stage-name prod

Both sets of requests were checked against the current SDK models (botocore 1.43.118). Either way, the function also needs a resource-based permission that lets API Gateway invoke it (aws lambda add-permission with the apigateway.amazonaws.com principal); the console adds it for you, the CLI does not, and its absence is the classic cause of 500 errors with "Invalid permissions on Lambda function". To keep an existing function's format 1.0 code working behind the HTTP API, set the integration's payload format: aws apigatewayv2 update-integration --api-id a1b2c3 --integration-id int1 --payload-format-version 1.0.

Which one should you choose?

Work down this list; the first "yes" decides it.

  1. Do you need API keys, usage plans or per-client quotas? REST API.
  2. Do you need AWS WAF directly on the API, a resource policy, or a private API? REST API.
  3. Do you need request validation, mapping templates, caching, X-Ray, canary releases, mock integrations or response streaming? REST API.
  4. Do you need an integration timeout above 30 seconds? REST API (Regional or private, with a quota increase), or better, an asynchronous design.
  5. Do you want JWT authorization without writing a Lambda authorizer, or Cloud Map integrations? HTTP API.
  6. None of the above? HTTP API: lower price, less to configure.

For WebSocket connections, neither: that is the third API type, covered in REST API vs WebSocket API. And if all you need is an HTTPS URL for one Lambda function, with no routing or authorizers, a Lambda function URL costs nothing extra at all.

Migrating a REST API to an HTTP API, step by step

  1. Check the REST-only list. If the API uses API keys, usage plans, WAF, a resource policy, validation, caching or a private endpoint, stop: either keep it on REST or replace that feature first (for example, WAF on a CloudFront distribution in front).
  2. Make every Lambda function format-aware (the handler above), or plan to set payload format 1.0 on the new integrations.
  3. Recreate authorizers. Cognito user pool authorizers become JWT authorizers (issuer is the user pool URL, audience is the app client ID); Lambda authorizers can stay, with the HTTP API's simple response format as an option.
  4. Recreate CORS as an HTTP API setting, and remove the OPTIONS methods and gateway responses that REST needed.
  5. Import or rebuild the routes. An OpenAPI definition exported from the REST stage can be imported into an HTTP API; review what it drops.
  6. Test on the new endpoint with real requests, including repeated query parameters, cookies and error paths.
  7. Switch the custom domain's API mapping from the REST stage to the HTTP API stage, so clients keep the same URL.
  8. Watch errors for a day, then delete the REST API.

Ethan's migration, done in this order the second time, took an afternoon and saved $30 a month. "Thirty dollars for one afternoon," Jake said. "Do that again next month." Ethan explained that it only works once per API.

HTTP API vs REST API in AWS exams

Developer Associate and Solutions Architect questions use a few reliable signals:

  • "Lowest cost", "lowest latency", "simple Lambda proxy", "JWT", "OIDC" point to an HTTP API.
  • "API keys", "usage plans", "throttle each customer", "monetize the API" point to a REST API with usage plans.
  • "Protect the API with AWS WAF" or "accessible only from a VPC" point to a REST API (WAF; private endpoint).
  • "Cache responses to reduce backend load" points to REST API caching.
  • "Validate request payloads before invoking the backend" points to REST API request validation.

Troubleshooting by symptom

Every request fails after moving to an HTTP API

The function reads format 1.0 fields such as httpMethod. Make it format-aware or set the integration's payload format to 1.0.

Query parameters arrive as "a,b" instead of a list

Payload format 2.0 joins repeated parameters with commas. Split them in code, or use format 1.0's multiValueQueryStringParameters.

My Cognito authorizer rejects valid tokens on the HTTP API

The JWT authorizer's audience must be the app client ID, and the issuer must be the exact user pool URL.

I cannot attach AWS WAF to my HTTP API

WAF supports REST APIs, not HTTP APIs. Put CloudFront with WAF in front, or use a REST API.

My HTTP API times out at 30 seconds

That is the hard maximum. Return quickly and finish the work asynchronously, or use a Regional REST API with a raised timeout.

The HTTP API bill is higher than expected for uploads

HTTP API requests are metered in 512 KB increments, so large request bodies count as several requests. Upload large files to S3 with presigned URLs.

Frequently asked questions

What is the difference between an HTTP API and a REST API in API Gateway?

HTTP APIs are cheaper and simpler, with built-in JWT authorizers. REST APIs add API keys, usage plans, WAF, caching, validation, private endpoints and X-Ray.

Is an HTTP API cheaper than a REST API?

Yes: $1.00 per million requests against $3.50 in US East, about 71 percent less, though HTTP APIs meter in 512 KB increments.

Is an HTTP API faster than a REST API?

HTTP APIs were built for lower latency with fewer features in the path; for most apps the difference is small next to the backend's own time.

Can I use API keys with an HTTP API?

No. API keys, usage plans and per-client throttling are REST API features.

Does an HTTP API support AWS WAF?

No. Use a REST API, or put CloudFront with AWS WAF in front of the HTTP API.

Does an HTTP API support Cognito?

Yes, through a JWT authorizer pointed at the Cognito user pool, with the app client ID as the audience.

What is the timeout for an HTTP API?

Up to 30 seconds per integration, and it cannot be raised. REST APIs default to a 29-second maximum that can be raised for Regional and private APIs.

What is payload format version 2.0?

The HTTP API's default Lambda event shape: method under requestContext.http, rawPath, a cookies list, and comma-joined repeated values.

Can an HTTP API send the same event as a REST API?

Yes. Set the integration's payload format version to 1.0.

Can I convert a REST API to an HTTP API?

There is no one-click conversion. Export the REST API's OpenAPI definition, import it as an HTTP API, then fix authorizers, CORS and the Lambda event format.

Does an HTTP API support private endpoints?

No. HTTP APIs are Regional and public; private APIs reachable only through a VPC endpoint are a REST API feature. HTTP APIs can still reach private backends through VPC links.

Does an HTTP API support caching?

No. Caching is a REST API feature; for HTTP APIs, cache with CloudFront in front.

Is the HTTP API the same as API Gateway v2?

HTTP APIs are managed through the apigatewayv2 API, which also manages WebSocket APIs. REST APIs use the original apigateway API.

When should I use a REST API instead of an HTTP API?

When you need API keys, usage plans, WAF, resource policies, private endpoints, caching, validation, X-Ray, canary releases or response streaming.

Is there a free tier for API Gateway HTTP APIs?

Under the legacy free tier, 1 million HTTP API calls and 1 million REST API calls a month for 12 months. Newer accounts use free tier credits.

What is the difference between an API and an API gateway?

An API is the interface your application offers. An API gateway is a managed front door that receives requests for it and handles routing, authorization, throttling and logging before your code runs.

Does a REST API in API Gateway use HTTPS?

Yes. REST, HTTP and WebSocket APIs in API Gateway all expose HTTPS (or WSS) endpoints only.

Is a web API the same as a REST API?

A web API is any API reached over HTTP. REST is one style for designing it. In API Gateway, both the REST API and HTTP API products serve RESTful web APIs.

Do REST APIs and HTTP APIs share throttling limits?

Yes. The account limit of 10,000 requests per second, with a 5,000 burst, per Region is shared by REST, HTTP and WebSocket APIs.

Why does AWS seem to ignore API Gateway HTTP APIs?

Features such as response streaming exist only on REST APIs, and HTTP APIs still lack AWS WAF, API keys, caching and private endpoints. HTTP APIs are fully supported and remain the cheaper choice when you need none of those.

Can I use API Gateway as an authentication proxy for an on-premises API?

Yes. Put a JWT authorizer (for example, a Cognito user pool) on an HTTP API route, or Cognito or IAM authorization on a REST API, and integrate with the backend over its public HTTPS URL or over a VPC link to a private NLB or ALB connected to your data center.

Can API Gateway rate limit per API key?

Only REST APIs: usage plans set a rate and burst limit (a token bucket) and an optional quota for each API key. HTTP APIs have no API keys, only stage-level and route-level throttling.

For readers preparing for an AWS certification

We have been covering AWS certifications alongside our fixes, so here is a short extra for readers studying for one. If you only came for the fix, you already have it; feel free to skip this part.

Exams that test this topic: Developer – Associate (DVA-C03 from December 1, 2026) • Solutions Architect – Associate (SAA-C03) • Solutions Architect – Professional (SAP-C03 from November 17, 2026).

Here are the exam-style questions this topic tends to raise, with the reasoning you need to answer them:

1. A startup needs the lowest-cost HTTPS front end for Lambda functions with Cognito JWT validation and no other API management features. Which API Gateway option?

An HTTP API with a JWT authorizer (issuer = user pool URL, audience = app client ID).

2. A company sells API access and must give each customer its own key, quota and rate limit. Which option?

A REST API with API keys and usage plans (per-client throttling and quotas).

3. An API must be protected by AWS WAF rate-based rules attached directly to the API. Which API type supports this?

A REST API; HTTP APIs cannot be associated with AWS WAF (put CloudFront with WAF in front instead).

4. After moving a Lambda-backed endpoint from a REST API to an HTTP API, every request fails with KeyError 'httpMethod'. Why, and what are two fixes?

HTTP APIs send payload format 2.0 by default (method under requestContext.http); make the handler format-aware or set the integration's payload format version to 1.0.

5. An API must be reachable only from inside a company's VPCs through an interface endpoint. Which API type and endpoint?

A REST API with a private endpoint type and a resource policy; HTTP APIs support only Regional endpoints.

6. Which API Gateway feature validates request bodies against a JSON schema before invoking the backend?

REST API request validation (request validators with models).

Exam codes and dates change often. Our AWS certification changes page keeps track of what is current.

πŸ“š ALSO READ

More API Gateway guides:

📌 Pay for REST when you need its list. Otherwise, HTTP, and fix the event first.

The order-tracking endpoint has run on the HTTP API ever since, with a JWT authorizer instead of the Lambda authorizer Ethan used to maintain. Jake noticed only one thing: the line on the bill got smaller. He asked whether there was a third kind of API that was cheaper still. Ethan said yes, a function URL, and that they would talk about it next year.

📌 If you keep one line from this page

Use an HTTP API ($1.00 per million) unless you need a REST-only feature (API keys, WAF, caching, validation, private endpoints, X-Ray), and when you migrate, fix the Lambda event: format 2.0 has no httpMethod.

US East (N. Virginia) prices as of October 2026; Lambda handlers run against the official payload format 1.0 and 2.0 sample events with Python 3.

Revision note. Written October 23, 2026. "Cut your coat according to your cloth," the proverb says; with API Gateway, buy the REST features only when you will wear them.

Related