My Authors
Read all threads
I have spent quite a bit of time with AppSync on a few projects, and it's really grown on me, big time. So much of what's difficult with API GW comes out-of-the-box.

Here are 5 things that really stood out (a long form blog post to follow soonish)

#serverless #aws #graphql

1/
1. Coginot group-based authentication.

This is a big undertaking with API GW, you have to assign IAM roles to groups, set precedence order, then write a custom auth Lambda func & generate policy yourself.

With AppSync, it's built-in, literally a one-liner!

2/
2. Request & response validation.

With API GW you need to set request model (not bad) but there's no response validation (the response model is only used for doc generation) so you have to roll your own.

With AppSync, it's just how GraphQL works, no extra work required.

3/
3. Web sockets.

With API GW I have to manage the connection mapping myself, there's 0 support for broadcasts. If I wanna send update to 1M subscribers, that's 1M reads from DynamoDB + 1M API GW calls...

AppSync subscriptions scales to millions, and I don't have to manage it

4/
4. Automated API documentation.

Ok, more of a tooling problem than API GW itself. Tools like @goserverless and SAM doesn't support contract-first development, nor do they support API doc generation particularly well.

With AppSync, my .graphql files are my contracts.

5/
5. Integration with DynamoDB.

API GW service proxies support more services (by a country mile!) but they aren't easy to configure (unless you use the console, because who needs IAC...)

With AppSync you mostly just follow the template and fill in your bits.

6/
5.1 AppSync's DynamoDB integration also offers lot of value-add feats, such as support for "nextToken" for pagination, and all the util functions (autoId, timestamps, null checks, etc.). It's much easier to go without Lambda functions with AppSync + DynamoDB than with API GW

7/
I'm not saying API GW is a bad service at all. On the contrary, it's been great for me for years. But a lot of what it offers feels low-level compares to AppSync. And I have to keep implementing things that the platform oughtta provide (e.g. cognito group-based auth)

8/
On a recent project, I spent a full week implementing group-based auth, request & response validation and automated API doc generation.

When I eventually gave up and restarted from scratch with AppSync, I got all of these + more in just a few hours, not looked back since.

9/
The developer experience working with these two services have been startling.

I thought I've had it good with API GW, but AppSync has really upstaged it and it's hard for me to go back to API GW nowadays...

10/
But there are still room for improvement for AppSync too, and I'm looking forward to where @ednergizer and his team takes it next!

Good job guys 👏👏👏

end/
Missing some Tweet in this thread? You can try to force a refresh.

Enjoying this thread?

Keep Current with Yan Cui

Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

Twitter may remove this content at anytime, convert it as a PDF, save and print for later use!

Try unrolling a thread yourself!

how to unroll video

1) Follow Thread Reader App on Twitter so you can easily mention us!

2) Go to a Twitter thread (series of Tweets by the same owner) and mention us with a keyword "unroll" @threadreaderapp unroll

You can practice here first or read more on our help page!

Follow Us on Twitter!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!