Posted On: May 30, 2019
Starting today, the Amplify CLI (part of the open source Amplify Framework) includes support for adding an AWS Lambda function to your AWS AppSync API using the GraphQL Transformer and the new @function directive. The GraphQL Transformer, included in the Amplify CLI, provides a simple to use interface that helps developers quickly create scalable web and mobile backends on AWS.
This release also adds features to the GraphQL Transformer that enable developers to use a new @key directive in their schema that simplifies the syntax for creating custom indexes and performing advanced query operations with Amazon DynamoDB. The @key directive streamlines the process of configuring key structures to fit various access patterns when using DynamoDB as a data source.
In addition, this release improves the overall support for AWS Lambda by giving developers the ability to grant permissions for interacting with AWS resources from a Lambda function. This updates associated IAM execution role policies without needing to perform manual IAM policy updates. Amplify automatically populates environment variables during your Lambda deployment and emits them in code samples for easy reference during development.