Q. What application developer languages are supported in AWS AppSync?

AWS AppSync SDKs support iOS, Android, and JavaScript. The JavaScript support spans web frameworks such as React and Angular as well as technologies such as React Native and Ionic. You can also use open source clients to connect to the AppSync GraphQL endpoint for using other platform such as generic HTTP libraries or even a simple CURL command.

Q. What is GraphQL ? 

GraphQL is a data language to enable client apps to fetch, change and subscribe to data from servers. In a GraphQL query, the client specifies how the data is to be structured when it is returned by the server. This makes it possible for the client to query only for the data it needs, in the format that it needs it in.

Q. What is a GraphQL Schema? 

A GraphQL schema is a definition of what data capabilities are available for the client application to operate on. For example, a schema might say what queries are available or how an app can subscribe to data without needing to know about the underlying data source. Schemas are defined by a type system, which an application's data model can leverage.

Q. Do I need to know GraphQL to get started? 

No, AWS AppSync can automatically setup your entire API, schema, and connect data sources with a simple UI builder that allows you to type in your data model in seconds. You can then immediately begin using the endpoint in a client application. The console also provides many sample schema and data sources for fully functioning applications.

Q. What type of data sources can I use with AWS AppSync?

You can use AWS AppSync with new or existing AWS resources, like tables, functions, and domains from Amazon DynamoDB, AWS Lambda and Amazon OpenSearch Service with a GraphQL schema. You can also connect to any data sources and services that provide an HTTP API. AWS AppSync allows you configure the interactions with your resolvers written in JavaScript.

Q. How do I write my AWS AppSync business logic?

GraphQL requests execute as "resolvers" and need to be converted into the appropriate message format for the different AWS Services that AWS AppSync integrates. For example, a GraphQL query on a field will need to be converted into a unique format for Amazon DynamoDB, AWS Lambda, and Amazon OpenSearch Service respectively. AWS AppSync allows you to write the custom logic for your resolvers using JavaScript, and to execute your code on a custom AppSync JavaScript runtime. This allows you to define how an incoming request should be transformed to interact with your data sources, and how responses from your data sources should be mapped back into a GraphQL response.

Q. How do I verify the behavior of my JavaScript code?

You can verify the behavior of your code directly from the console. From the console, you can use mock data to test the evaluation of your resolvers without interacting with your data sources. AppSync also provides remote APIs that you can use to evaluate your JavaScript code with mock data. You can leverage these APIs from the AWS CLI or the AWS SDKs. This allows you to evaluate your resolvers inside your favorite test framework and to run unit tests. You can also use the console’s query editor to test GraphQL queries, mutations, and subscriptions and live stream log data for each request in realtime.

Q. Should I use JavaScript resolvers to access my data sources directly? Or should I use a Lambda data source to handle my business logic?

With JavaScript resolvers, you can write your own code, that implements your custom business logic to access your data sources. This makes it easy for you to directly interact with data sources like Amazon DynamoDB, Amazon Aurora Serverless, Amazon OpenSearch Service, HTTP APIs, and other AWS services, without having to deploy additional compute services or infrastructure. AWS AppSync also makes it easy to interact with an AWS Lambda function by configuring a Lambda data source. Lambda data sources allow you to run complex business logic using AWS Lambda’s full set capabilities to resolve a GraphQL request. In most cases, an AppSync function directly connected to its target data source will provide all of the functionality you need. In situations where you need to implement complex business logic that is not supported by the JavaScript resolvers, you can use a Lambda data source as a proxy to interact with your target data source.

Q. Does AWS AppSync support API federation?

Yes, API federation is supported in AWS AppSync via the Merged APIs feature. A Merged API is a single GraphQL API composed from multiple source GraphQL APIs, representing different services or data sources. With a Merged API an organization can provide a single API schema to data consumers, while enabling independent evolution of sub-schemas by the teams that are most familiar with its related data domain. For teams sharing development of a single AppSync API, the Merged APIs feature allows them to collaborate seamlessly while operating independently. 

Q. Can I use AWS AppSync with my existing AWS resources? 

Yes. With AWS AppSync you can use existing tables, functions, and domains from Amazon DynamoDB, AWS Lambda and Amazon OpenSearch Service with a GraphQL schema. AWS AppSync allows you to create data sources using existing AWS resources and configure the interactions using Mapping Templates.

Q. How is data secured with AWS AppSync? 

Application data is stored at rest in your AWS account and not in the AWS AppSync service. You can protect access to this data from applications by using security controls with AWS AppSync including AWS Identity and Access Management (IAM), as well as Amazon Cognito User Pools. Additionally, user context can be passed through for authenticated requests so that you can perform fine-grained access control logic against your resources with Mapping Templates in AWS AppSync.

Q. Can I make my data real-time with AWS AppSync?

Yes. Subscriptions are supported with AWS AppSync against any of the data sources, so that when a mutation occurs, the results can be passed down to clients subscribing to the event stream immediately using over WebSockets.

Q. How can I do complex queries with AWS AppSync?

The data sources available to AWS AppSync allow you to take full advantage of capabilities provided by Amazon DynamoDB, Amazon OpenSearch Service, and AWS Lambda when using GraphQL. Features such as indexing and conditional checks, return comprehensive results from DynamoDB. Use cases such as fuzzy searches, geo searches and more that Amazon OpenSearch Service offers are available to your application. Finally, Lambda can be used for serial or batched requests to return data from other sources such as Amazon Aurora.

Q. What AWS Regions are available for AWS AppSync?

AWS AppSync is available in different regions around the globe, please refer to the AWS Regions table for more details.

Q. Can I import existing Amazon DynamoDB tables? 

AWS AppSync can automatically generate a GraphQL schema from an existing DynamoDB table, including the inference of your table’s key schema and indexes. Once the import is complete GraphQL queries, mutations, and subscriptions can be used with zero coding. AppSync will also “auto-map” non-key attributes from your GraphQL types to DynamoDB attributes.

Q. Can AWS AppSync create a database for me? 

Customers can create a GraphQL schema, either by hand or using the console, and AWS AppSync can automatically provision Amazon DynamoDB tables and appropriate indexes for you. Additionally, it will connect the data sources to "GraphQL resolvers" allowing you to just focus on your application code and data structures.

Q. What clients can I use to connect my application to my AppSync API?

You can use any HTTP or GraphQL client to connect to a GraphQL API on AppSync. We do recommend using the Amplify clients which are optimized to connect to the AppSync backend. There are some options depending on your application's use case:

  • For DynamoDB data sources, use the DataStore category in the Amplify client. It provides the best developer experience and built-in conflict detection and resolution.
  • For non-DynamoDB data sources in scenarios where you have no offline requirements, use the API (GraphQL) category in the Amplify client.
  • For non-DynamoDB data sources in scenarios where you have offline requirements, use the AppSync SDK.

Q. Can I use my own domain name to access my AppSync GraphQL endpoint?

AWS AppSync enables customers to use custom domain names with their AWS AppSync API to access their GraphQl endpoint and real-time endpoint. To create a custom domain name in AppSync, you simply provide a domain name you own and indicate a valid AWS Certificate Manager (ACM) certificate that covers your domain. Once the custom domain name is created, you can associate the domain name with any available AppSync API in your account. After you have updated your DNS record to map to to the AppSync-provided domain name, you can configure your applications to use the new GraphQL and real-time endpoints. You can change the API association on your custom domain at any time without having to update your applications. When AppSync receives a request on the custom domain endpoint, it routes it to the associated API for handling.

Q. Can I create private APIs with AppSync?

Yes, AWS AppSync supports private APIs. With private APIs, you can create GraphQL APIs that can only be accessed from your Amazon Virtual Private Cloud (VPC).

Q. What are resolvers?

AWS AppSync lets you respond to GraphQL requests by performing operations on your data sources. For each GraphQL field you wish to run a query, mutation, or subscription on, a resolver must be attached. Each resolver is configured with one or more functions that communicate with data sources. You can write your resolvers directly in JavaScript or bundle your TypeScript code.

Learn more about AWS AppSync Customers

Visit the customer page
Ready to get started?
Open the AWS AppSync console
Have more questions?
Contact us
  • Select