AWS Deep Dive — AppSync Cost

Gunjan
2 min readApr 22, 2023

--

Lets discuss the cost of AppSync in this post.

AWS AppSync pricing is based on a pay-as-you-go model. Users are charged for the following:

  • Queries: You are charged for each query that is executed against your GraphQL API.
  • Data modifications: You are charged for each data modification operation that is performed against your GraphQL API.
  • Real-time updates: You are charged for each real-time update that is sent to your clients.

The cost of each of these resources varies depending on the region and the type of resource. For more information, please see the AWS AppSync pricing page.

Here is an example of how AppSync pricing works. Let’s say you have a GraphQL API that is used by 10,000 users each month. Each user performs an average of 100 queries and 10 data modifications per month. You would be charged the following:

  • Queries: 10,000 users * 100 queries/user = 1,000,000 queries
  • Data modifications: 10,000 users * 10 data modifications/user = 100,000 data modifications

The total cost for this usage would be $1,000.00 for queries and $10.00 for data modifications, for a total of $1,010.00.

Lets take this to a very popular site with say 10 million users and millions of queries per day .

Interesting fact

Publishing data is cheaper than pulling data in AppSync. When you publish data, you are only charged for the size of the data that is published. However when pulling data, the charge is for the size of the data that is pulled, plus the amount of time it takes to pull the data.

If you have 100KB of data, the cost of publishing it will be $0.00004 * 100KB = $0.04. The cost of pulling it will be $0.00004 * 100KB + the amount of time it takes to pull the data.

The amount of time it takes to pull the data will depend on a number of factors, including the speed of your internet connection and the load on the AppSync service.

Ways to save. cost —

There are a number of ways to minimize costs while using AppSync. Here are a few tips:

  • Use the Free Tier: The AWS AppSync Free Tier includes 1 GB of publishing, 1 GB of delivering, and 1 GB of storage per month.
  • The smaller the message size, the less you will be charged.
  • Batching messages together can reduce the number of messages that you need to publish and deliver.
  • Caching data can reduce the number of times you need to pull data from the server.
  • Using a regional endpoint can reduce the amount of data that needs to be transferred across the network.

Please verify latest numbers on https://aws.amazon.com/appsync/pricing/

--

--

Gunjan
Gunjan

No responses yet