Posted On: Aug 5, 2020
Today we’re releasing a new way to interact with AWS Lambda data sources via GraphQL and AppSync: Direct Lambda Resolvers. With Direct Lambda Resolvers you can now build flexible GraphQL resolvers in the runtime of your choice, without VTL.
AWS AppSync is a managed GraphQL service that simplifies application development by letting you create a flexible API to securely access, manipulate, and combine data from one or more data sources with less network calls. With AppSync, you can build scalable applications, including those requiring real-time updates, on a range of data sources such as NoSQL data stores, relational databases, HTTP APIs, and your custom data sources with AWS Lambda.
To create a fully managed and scalable GraphQL API with AppSync, developers just need to model and define their data in a GraphQL schema, add data sources, and then configure resolvers which link the data defined in their GraphQL schema with their data sources. To help developers get started quickly, AppSync leverages the Apache Velocity Templates (VTL) to provide a rich set of Resolver Mapping Templates and built-in utilities for each supported data source.
With Direct Lambda Resolvers you can now bypass VTL-based Resolver Mapping Templates and consolidate all request and response mapping business logic for a GraphQL type, field or operation in your Lambda function. This allows developers to use their runtime of choice to power their GraphQL resolver logic without VTL. It is also possible to mix and match VTL-based Resolver Mapping Templates for Lambda and other data sources with Direct Lambda Resolvers in the same API.
Direct Lambda Resolvers are available everywhere AppSync is available, currently in 18 AWS regions globally: US East (N. Virginia and Ohio), US West (Oregon and N. California), Canada (Central), South America (Sao Paulo), EU (Milan, Frankfurt, Ireland, London, Paris and Stockholm), and Asia Pacific (Sydney, Tokyo, Mumbai, Seoul, Singapore and Beijing).
For more details on Direct Lambda Resolvers, refer to our blog post and the AppSync documentation.