AWS in 1 Min · Episode 136

AWS AppSync explained: managed GraphQL and real-time APIs

One endpoint, live updates. Watch the one-minute video, then read the details.

David Gomez1:19 video · 2 min read

"GraphQL means running your own server." Many teams that adopt GraphQL end up operating a Node.js or Java server, scaling it, securing it and keeping a WebSocket layer alive for real-time features. AWS AppSync is a managed, serverless GraphQL service: you define the schema and connect your data, and AWS runs and scales the API.

What GraphQL changes

A typical REST backend has many endpoints: /orders, /customers, /items. A mobile screen that needs a bit of each makes several calls and gets back fields it never shows. GraphQL exposes one endpoint. The client sends a query that names exactly the fields it needs, and gets them in a single request:

  • Queries read data.
  • Mutations change data.
  • Subscriptions let clients receive changes in real time.

The schema documents the whole API and types every field, which makes front-end and back-end teams' contract explicit.

Resolvers connect fields to data

In AppSync, each field is backed by a resolver that talks to a data source: Amazon DynamoDB, AWS Lambda, Amazon Aurora (through the RDS Data API), Amazon OpenSearch Service, Amazon EventBridge, any HTTP API, and Amazon Bedrock. Resolvers are written in JavaScript (or the older VTL templates), and a pipeline resolver can chain several steps. One query can pull a customer from DynamoDB, their orders from Aurora and a recommendation from Lambda.

Real time with subscriptions

When a mutation changes data, AppSync can push the result over WebSockets to every client subscribed to it. You don't manage connections, fan-out or reconnection servers. That is how chat apps, live dashboards, delivery tracking and collaborative editors get updates without polling.

For cases that don't need GraphQL at all, AppSync Events offers plain serverless WebSocket publish/subscribe channels.

Built in

  • Authorization: API keys, IAM, Amazon Cognito user pools, OpenID Connect and Lambda authorizers, and you can combine modes on one API.
  • Server-side caching for slow or popular queries.
  • AWS WAF, private APIs, logging, metrics and tracing.
  • Merged APIs to combine several teams' GraphQL APIs behind one endpoint.

A common mistake is treating subscriptions as a database change feed: they fire on mutations sent through AppSync. If another process writes straight to DynamoDB, subscribers won't hear about it unless that change is also sent through a mutation (for example from a DynamoDB Streams consumer).

Where AI fits

AI chat apps need exactly what AppSync does well: streaming partial answers to the right screens. A documented pattern: a Lambda function calls Amazon Bedrock's streaming API, and as tokens arrive it sends each chunk as a mutation; every client subscribed to that conversation sees the answer appear live, on the phone and the laptop at once. For short calls (10 seconds or less), AppSync can also invoke Amazon Bedrock directly from a resolver, without a Lambda function in between; that direct path doesn't stream.

Quick recap

  • One endpoint, exact fields: GraphQL queries, mutations and subscriptions.
  • Resolvers connect each field to DynamoDB, Lambda, Aurora, OpenSearch, HTTP and more.
  • Subscriptions push live updates over managed WebSockets, perfect for AI chat.
AWS in 1 Min #136 · 1:19

Need an AWS expert on your team?

I'm David, an AWS expert and fractional cloud consultant. I work alongside your team to run your cloud and infrastructure: architecture, security, cost and day-to-day operations. You get senior AWS experience when you need it, without the cost of a full-time hire.

  • Architecture reviews and a clear plan for what to fix first
  • Security hardening: IAM, networking, audits
  • Lower AWS bills without slowing your team down
  • Hands-on help with AI workloads on AWS