AppSync vs API Gateway cost: GraphQL vs REST pricing
AWS AppSync (managed GraphQL) and API Gateway (REST and HTTP) are priced differently and suit different workloads. AppSync bills per query and real-time message; API Gateway bills per request. Here is how they compare and when each is cheaper.
Quick answer
AWS AppSync bills per million GraphQL query and mutation operations, plus per million real-time subscription messages and connection-minutes, while API Gateway bills per million requests (HTTP APIs cheaper than REST). For simple request/response APIs, API Gateway HTTP APIs are usually cheaper per operation. AppSync earns its price when you need managed GraphQL: a single query fetching from multiple data sources, built-in real-time subscriptions, and caching, which would take extra services to replicate behind API Gateway. Choose by workload shape, not price alone: GraphQL plus real-time favors AppSync, simple REST favors API Gateway.
AppSync and API Gateway both front your backend, but they are different products with different billing models, so comparing them means comparing both the per-operation price and what each includes. AppSync is managed GraphQL with real-time built in; API Gateway is REST and HTTP request proxying. The cheaper choice depends on the shape of your API.
How each is priced
| Service | Billed on |
|---|---|
| AppSync | Query/mutation operations, real-time messages, connection-minutes, optional cache |
| API Gateway HTTP API | Requests received (cheaper tier) |
| API Gateway REST API | Requests received (premium tier) |
AppSync charges per million GraphQL operations, plus per million real-time subscription messages and for the connection-minutes clients stay subscribed, plus an optional caching tier. API Gateway charges per million requests, with HTTP APIs priced well below REST APIs (seeREST vs HTTP API cost). For a plain request/response workload, API Gateway HTTP APIs are usually the cheaper front door per operation.
What AppSync bundles in
AppSync's value is not a lower per-request price; it is what it replaces. A single GraphQL query can resolve data from multiple sources (DynamoDB, Lambda, HTTP, RDS) in one request, real-time subscriptions are built in rather than requiring a separate WebSocket setup, and server-side caching is a toggle. To match that behind API Gateway you would wire up multiple integrations, a WebSocket API, and a cache yourself. So AppSync can be cheaper in total even at a higher per-operation rate, because it collapses several services into one.
When each is cheaper
For a simple REST-style API proxying to Lambda or an HTTP backend, API Gateway HTTP APIs win on raw cost. For a data-rich client app that needs GraphQL's single-request aggregation, real-time subscriptions, and caching, AppSync usually wins on total cost and on engineering time, because replicating it is expensive. The mistake is comparing per-operation prices in isolation: count the services each approach requires, and the downstreamdata transfer and resolver compute, before deciding.
The costs that sit alongside both
Whichever front door you pick, you still pay for what it calls: the Lambda functions, DynamoDB tables, or databases behind the resolvers, plus data transfer out. Neither AppSync nor API Gateway is the whole bill; they are the entry layer. So estimate the full path (gateway plus resolvers plus data stores plus transfer), and for the backend data layer note that a service likeDynamoDB capacity planning often drives more cost than the API layer itself.
FAQ
Is AppSync more expensive than API Gateway?
Per operation, AppSync's GraphQL query pricing plus real-time message and connection-minute charges are usually higher than API Gateway HTTP API request pricing. But AppSync can be cheaper in total for GraphQL and real-time workloads because it bundles multi-source resolution, subscriptions, and caching that would take several extra services to replicate behind API Gateway. Compare total cost and services required, not just per-operation rates.
How is AppSync priced?
AppSync bills per million GraphQL query and mutation operations, plus per million real-time subscription messages and for the connection-minutes clients stay subscribed, plus an optional server-side caching tier billed by cache size. You also pay separately for the downstream resolvers (Lambda, DynamoDB, databases) and data transfer out. The real-time and connection charges are what distinguish it from API Gateway's simpler per-request model.
When is API Gateway cheaper than AppSync?
For simple request/response APIs proxying to Lambda or an HTTP backend, API Gateway HTTP APIs are usually cheaper per operation, since you are not paying for GraphQL resolution, real-time subscriptions, or caching you do not use. If your clients just make REST-style calls and do not need single-request data aggregation or built-in subscriptions, API Gateway is the leaner, cheaper choice.
When is AppSync worth its higher per-operation cost?
When you need managed GraphQL: a single query resolving data from multiple sources in one request, built-in real-time subscriptions without a separate WebSocket setup, and toggle-on caching. Replicating that behind API Gateway means wiring multiple integrations, a WebSocket API, and a cache yourself. For data-rich client apps that need those features, AppSync usually wins on total cost and engineering time despite the higher per-operation rate.
What other costs come with AppSync or API Gateway?
Both are just the entry layer, so you also pay for the downstream resolvers and backends: Lambda functions, DynamoDB tables, or databases, plus data transfer out. For many APIs the backend data layer (for example DynamoDB capacity) costs more than the API layer. Estimate the full path, gateway plus resolvers plus data stores plus transfer, rather than the front-door price alone.
Does C3X help compare AppSync and API Gateway cost?
C3X prices infrastructure from Terraform before deploy, so an AppSync API or an API Gateway definition and the resolvers behind it are costed against a live catalog in the pull request. That lets you compare the front-door options and see the backend resources they invoke before committing, rather than discovering the total path cost on the bill afterward.
What to do next
Compare GraphQL and REST API cost before you build. C3X prices your Terraform against a live resource catalog. Start with the quickstart.
Share this post
Try C3X on your own Terraform
Free and open source. No API key required. One command to install, one command to estimate.