> ## Documentation Index
> Fetch the complete documentation index at: https://help.nops.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Migrate API Gateway REST APIs to HTTP APIs

> Move API Gateway REST APIs to HTTP APIs, which are priced lower per request.

API Gateway offers REST APIs and HTTP APIs. HTTP APIs have fewer features but cost less per request. Many APIs that only proxy to Lambda or an HTTP backend do not use any REST-only feature. nOps finds REST API stages with request charges and estimates the saving from moving them to an HTTP API.

| | |
| - | - |
| **Cloud** | AWS |
| **Category** | Networking |
| **Service** | Amazon API Gateway |
| **Action** | Modify |
| **Effort** | High |
| **Restart needed** | No |
| **Can be rolled back** | Yes |
| **Analysis window** | Last 7 days |
| **Source** | nOps |

## Why it matters

For high-volume APIs the request charge is most of the API Gateway bill, so the lower HTTP API price adds up quickly.

## How nOps finds it

nOps reads the last 7 complete days of REST API request charges for each stage. Stages billed for an API cache in the last 20 days are skipped. The REST and HTTP list prices are worked out through AWS's public request tiers at your account's monthly REST request volume in that region. The saving is the stage's request cost times the difference between the two, scaled to a month, and must be at least \$20 a month.

## Before you start

Check that the API uses no REST-only features: API keys and usage plans, request validation, caching, AWS WAF, X-Ray tracing, private or edge-optimized endpoints, or mapping templates.

## How to implement

1. Review the REST API's configuration against the list of features HTTP APIs do not support.
2. Create an HTTP API with the same routes, integrations and authorizers (JWT or Lambda authorizers). You can import an OpenAPI definition exported from the REST API.
3. Test the HTTP API, then move clients over, for example by pointing your custom domain's API mapping at the new API.
4. When the REST stage has no more traffic, delete it.
5. Update Terraform, CloudFormation or SAM definitions to the HTTP API.

## Risks and considerations

* This is a migration, not a setting: the API gets a new endpoint unless you use a custom domain.
* Request and response transformations, usage plans and some authorizer types work differently or are not available.
* To roll back, point the custom domain back at the REST API, which stays in place until you delete it.

## FAQs

> [accordion] Why are stages with caching skipped?
>
> HTTP APIs have no built-in cache, so an API that uses one would need a different design.

## Related

* [Supported recommendations](https://help.nops.io/inform/supported-recommendations.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.