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
- Review the REST API’s configuration against the list of features HTTP APIs do not support.
- 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.
- Test the HTTP API, then move clients over, for example by pointing your custom domain’s API mapping at the new API.
- When the REST stage has no more traffic, delete it.
- 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
Why are stages with caching skipped?
Why are stages with caching skipped?
HTTP APIs have no built-in cache, so an API that uses one would need a different design.