AWS AppSync のアイコン

AWS AppSync Popular2017年〜

A fully managed real-time data synchronization service for building and operating GraphQL APIs

What It Does

AWS AppSync is a fully managed API service based on GraphQL. It lets you easily build GraphQL APIs that integrate multiple data sources including DynamoDB, Lambda, RDS, and OpenSearch, with support for real-time data synchronization and offline access. Frontend applications can efficiently retrieve only the data they need from a single endpoint, greatly accelerating mobile app and SPA development.

Use Cases

AppSync is used for building real-time chat application backends, offline-capable data synchronization for mobile apps, implementing BFF (Backend for Frontend) patterns that aggregate data from multiple microservices, real-time data display for IoT dashboards, and feed update notifications for social media apps - essentially any application requiring real-time capabilities and data integration.

Everyday Analogy

Think of it like a restaurant ordering system. Traditional REST APIs are like set menus - you get a fixed combination of dishes. AppSync with GraphQL is like a buffet where you pick only the dishes (data) you want. Plus, it notifies you in real time when new dishes are added.

What Is AppSync?

AWS AppSync is a service that provides fully managed GraphQL API construction and operation. GraphQL is a query language developed by Facebook that lets clients specify the exact shape of data they need in their requests. This eliminates the over-fetching (retrieving unnecessary data) and under-fetching (needing additional requests due to insufficient data) common with REST APIs. AppSync makes it possible to leverage these GraphQL benefits without managing infrastructure.

Real-Time Sync and Offline Support

A major strength of AppSync is its WebSocket-based real-time subscription feature. It can instantly push data changes to clients, making it easy to build real-time applications like chat and collaboration tools. Combined with Amplify DataStore, you can implement an offline-first design where data is manipulated locally during network disconnections and automatically synced with the server when connectivity is restored. To gain a deeper understanding of real-time sync and offline support, reference books on Amazon are also worth checking out.

Data Source Integration

AppSync can integrate multiple data sources through resolvers and expose them as a single GraphQL endpoint. You can build APIs that combine diverse backends including DynamoDB tables, Lambda functions, RDS databases, OpenSearch clusters, and HTTP endpoints. Resolvers can be written in VTL (Velocity Template Language) or JavaScript, allowing flexible data transformation and business logic application.

Things to Watch Out For

  • GraphQL schema design directly impacts application usability, so thoroughly understand frontend requirements before designing
  • Real-time subscriptions maintain WebSocket connections, so be aware of connection limits and costs when handling a large number of simultaneous connections
共有するXB!