aws_appsync_graphql_api cost estimation
A managed GraphQL API with real-time subscriptions. Priced per query/mutation operation and per real-time update, plus connection minutes and optional caching.
An aws_appsync_graphql_api is a fully managed GraphQL endpoint with resolvers, subscriptions, and offline sync. It has no servers to provision, so the cost is entirely usage-based across a few clean dimensions.
The two main meters are query and mutation operations, billed at roughly $4.00 per million, and real-time updates pushed to subscribed clients, billed at roughly $2.00 per million. On top of those, subscription connections are charged per million connection-minutes. If you enable the optional server-side cache, that adds an hourly instance charge by cache size, the one always-on component.
c3x prices the operation and real-time-update dimensions from the monthly volumes you supply in c3x-usage.yml, and prices the cache (if configured) per hour. Without usage input the standing cost is zero unless caching is on, which is correct for a serverless API. The data sources behind the resolvers (DynamoDB, Lambda, RDS) bill as their own resources.
Terraform example
A minimal but realistic configuration that C3X can estimate.
resource "aws_appsync_graphql_api" "api" {
name = "app-graphql"
authentication_type = "AMAZON_COGNITO_USER_POOLS"
user_pool_config {
user_pool_id = aws_cognito_user_pool.users.id
default_action = "ALLOW"
aws_region = "us-east-1"
}
schema = file("schema.graphql")
}Pricing dimensions
What you actually pay for when you provision aws_appsync_graphql_api.
| Dimension | Unit | What's being charged |
|---|---|---|
| Query and mutation operations | per million operations | Each GraphQL query or mutation resolved. Usage-based; define monthly operations in c3x-usage.yml. $4.00 per million operations |
| Real-time updates | per million updates | Messages pushed to subscribed clients over WebSocket subscriptions. Usage-based. $2.00 per million updates |
| Connection minutes | per million minutes | Subscription connection time. Usage-based; matters for many long-lived subscribers. |
| Server-side cache | per hour | Optional caching instance by size, the only always-on cost. Billed continuously when enabled. |
Sample C3X output
Example output from c3x estimate (10M operations, 1M real-time updates):
aws_appsync_graphql_api.api
├─ Query/mutation operations 10 M-ops $40.00
└─ Real-time updates 1 M-updates $2.00
OVERALL TOTAL $42.00Optimization tips
Common ways to reduce aws_appsync_graphql_api cost without changing the workload.
Batch resolvers to cut operation count
Operation volumeEach top-level query/mutation is a billed operation. Using batch resolvers and well-designed schemas to fetch related data in one operation reduces the per-million charge.
Only enable caching when read patterns justify it
Cache instance hoursThe server-side cache is an always-on hourly cost. It pays off for repeated identical queries against expensive data sources; for low-repeat traffic it's pure overhead.
Scope subscriptions tightly
Real-time + connection chargesReal-time updates and connection-minutes scale with how many clients subscribe to how much. Filtering subscriptions so clients only receive relevant updates cuts both meters.
FAQ
How does c3x estimate AppSync cost?
It prices query/mutation operations and real-time updates from the monthly volumes you supply in c3x-usage.yml. If a server-side cache is configured, that hourly instance is priced continuously. Without usage and no cache, the standing cost is zero.
Why does an AppSync API with no traffic cost nothing?
AppSync is serverless and operation-metered. With no queries and no caching enabled, there's no charge. Cost appears only with traffic or an enabled cache.
Are the data sources included in the estimate?
No. Resolvers hit data sources like DynamoDB, Lambda, or RDS, each billed as its own resource. c3x estimates those separately if they're in your Terraform.
What drives cost for a real-time app?
Real-time updates ($2/M) and connection-minutes. An app with many subscribers receiving frequent updates can see these exceed the query cost. Model expected update and connection volume in the usage file.
Is the server-side cache worth it?
Only when you have repeated identical queries against slow or expensive data sources. The cache is an always-on hourly cost, so for low-repeat traffic it adds cost without saving operations.
Related resources
Estimate this resource in your own Terraform
Free, open source, no API key. C3X parses your Terraform and shows line-item cost for every resource, including aws_appsync_graphql_api.