VTL resolver tutorials for Amazon AppSync - Amazon AppSync
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

VTL resolver tutorials for Amazon AppSync

Note

We now primarily support the APPSYNC_JS runtime and its documentation. Please consider using the APPSYNC_JS runtime and its guides here.

Data sources and resolvers are used by Amazon AppSync to translate GraphQL requests and fetch information from your Amazon resources. Amazon AppSync supports automatic provisioning and connections with certain data source types. Amazon AppSync also supports Amazon Lambda, Amazon DynamoDB, relational databases (Amazon Aurora Serverless), Amazon OpenSearch Service, and HTTP endpoints as data sources. You can use a GraphQL API with your existing Amazon resources or build data sources and resolvers from scratch. The following sections are meant to elucidate some of the more common GraphQL use cases in the form of tutorials.

Amazon AppSync uses mapping templates written in Apache Velocity Template Language (VTL) for resolvers. For more information about using mapping templates, see the Resolver mapping template reference. More information about working with VTL is available in the Resolver mapping template programming guide.

Amazon AppSync supports the automatic provisioning of DynamoDB tables from a GraphQL schema as described in Provision from schema (optional) and Launch a sample schema. You can also import from an existing DynamoDB table which will create schema and connect resolvers. This is outlined in Import from Amazon DynamoDB (optional).