REST APIs vs HTTP APIs

~8 min read

Two API types within API Gateway, trading feature richness for cost and latency.

REST APIs are API Gateway's original, most feature-complete option: request/response transformation via Velocity Template Language mapping templates, usage plans with API keys for per-consumer rate limiting and tracking, request validation, and deep AWS WAF integration for request filtering. This feature richness comes at a higher cost per request and somewhat higher latency than the newer HTTP API type.

HTTP APIs were introduced later specifically to cover the majority of common use cases — simple routing to Lambda or HTTP backends, JWT-based authorization — at significantly lower cost (up to ~70% cheaper) and lower latency, with a much simpler configuration model. They lack REST API's usage plans/API keys, request validation, and the full mapping template transformation capability.

The practical decision rule most teams use: default to HTTP APIs, and only reach for REST APIs when a specific, confirmed requirement (typically usage plans for a partner/public API product, or complex request transformation) isn't met by HTTP APIs' simpler feature set.

💬 Deep Dive with AI

Key points

  • REST APIs: full feature set (usage plans, API keys, request transformation), higher cost/latency
  • HTTP APIs: simpler, ~70% cheaper, lower latency, covers most common use cases
  • HTTP APIs lack usage plans/API keys and advanced request transformation
  • Default to HTTP APIs; use REST APIs only for a specific confirmed feature need