AWS AppSync pricing

aws
lambda

#1

Hello everyone.
I am about to build an application that should use a Serverless architecture with real-time feature (for an instant messaging module)
In order to assure scalabality, I want to use either AWS lambda or AWS AppSync, and I am more inclined to AppSync regarding its native support of GraphQL
The main question that I want to ask you guys is related to the pricing of AppSync: Since AWS Lambda costs $0.2/1M requests, and AWS AppSync costs $4/1M Query (https://aws.amazon.com/appsync/pricing/), does that mean that AppSync is 20 time more expensive than Lambda?
I know that there is more input parameters than just the number of requests or queries to decide what is the monthly price, but I just want to have a big picture before engaging any development.
I posted the question to Quora (https://www.quora.com/unanswered/Is-AWS-AppSync-20-times-more-expensive-than-AWS-Lambda) but there is no answer yet.
Thank you for your time!


#2

Thats a great question. The AppSync stuff is so new, that I’m finding a lot of people are trying to figure out some of the same questions. I recommended your question Quora.


#3

For most people AppSync will replace the API Gateway in their stack. AppSync is charged at $4/million while the API Gateway is charged at $3.50/million. In both cases Lambda charges are in addition. As GraphQL is designed to reduce the number of requests you make to your API I suspect it still works out cheaper even with the slightly higher cost.


#4

@buggy, sounds like you are comparing AppSync (a GraphQL gateway) with API Gateway (a restful gateway) directly, is this interpretation of your above post correct?

In another question in this context is whether you see AppSync + Dynamo a comparable / alternative route to API-Gateway + Lambda + Dynamo. If so, then AppSync == API-Gateway + Dynamo in this context.

Would love to see your view point…


#5

@syang AppSync and the API Gateway are directly comparable in the stack. One provides a GraphQL endpoint, the other a REST endpoint. Everything else remains the same. Both AppSync and the API Gateway can proxy to DynamoDB or Lambda.

AppSync -> DynamoDB or API Gateway -> DynamoDB
AppSync -> Lambda -> DynamoDB or API Gateway -> Lambda -> DynamoDB

The biggest difference are:

  1. The API Gateway can proxy to more AWS services than AppSync currently can.
  2. AppSync is missing true anonymous access, custom authorizers and usage plans.

Personally my default is now AppSync and I only use the API Gateway if I need to provide a REST API.