12 New Features of AWS Amplify

Over the past few months AWS Amplify has added quite a few new features. In this post I've outlined some of the most popular ones for you to get up to speed with what the framework has added.

1. Local Mocking / Testing & GraphiQL Editor

The new local mocking feature enables you to develop, debug, model and test your AWS AppSync GraphQL APIs locally. You can also test storage, serverless functions, and generate code locally using the existing GraphQL code-gen feature.

With the testing server running, you application can operate against the local environment while you model your data and test out your APIs and front end integration. GraphiQL is built in so you can test mutations, queries, and subscriptions directly in your browser as well.

Once you've tested you can then deploy your changes to the scalable, highly available backend services in the cloud as you’ve always done.

A video is worth a thousand words:

2. AI & ML

Amplify recently add the Predictions category which allows you to integrate AI & ML into your app using a variety of managed services that allow you to do things like:

  • Translating text from one language to another
  • Converting text to speech
  • Text recognition from image
  • Entities recognition
  • Label real world objects
  • Interpretation of text
  • Uploading images for automatic training
  • Transcribing text

I wrote a post showing how to build an AI enabled chrome plugin, you should check it out:

3. Multiple Authorization Support

Multi-auth support was added to enable public / private controls you can mix & match and multiple authentication providers for managed GraphQL APIs (API Keys, IAM, Cognito User Pools, OIDC).

This enables a host of new applications to be built much easier powered by a managed GraphQL backend.

4. Lambda Function Resolvers

It’s now possible to add a AWS Lambda functions as a data source for your AWS AppSync API using the GraphQL transformer that’s included in the Amplify CLI.

You can also grant permissions for interacting with AWS resources from the Lambda function.

If you're interested in learning more, I've blogged about how to build a cryptocurrency app using Lambda resolvers:

5. Lambda Function Triggers

You can now set up AWS Lambda triggers directly from the Amplify CLI.

Using Lambda triggers you can call event-based Lambda functions for authentication, database actions, and storage operations from other AWS services like Amazon Simple Storage Service (Amazon S3), Amazon Cognito, and Amazon DynamoDB.

Now, the Amplify CLI allows you to enable and configure these triggers. The CLI further simplifies the process by providing you with trigger templates that you can customize to suit your use case.

Lambda triggers are useful for doing things like adding users to groups for group-based authorization, calling a Lambda function when an image or file is uploaded to S3, or calling a function when an item is placed or updated in your database.

To learn more, check out the docs here.

6. Custom Indexes for GraphQL Transform

The @key directive allows you to model and configure custom index structures for @model types. This enables multiple, flexible, and powerful data access patterns to your data.

Learn more here.

7. Support for Amazon Aurora Serverless

You can now use an existing Amazon Aurora Serverless database as a data source for your AWS AppSync GraphQL APIs when you’re building your mobile and web applications.

This enables you to use the Amplify CLI to generate a GraphQL API with an auto-generated schema and resolvers that work with an existing Aurora Serverless database.

This adds another first-class relational database data source to Amplify in addition to the existing choices of DynamoDB for NoSQL, Lambda functions, Elasticsearch, HTTP, and None.

To learn more, check out the blog post here.

8. Simplified OAuth flows

It’s now possible to configure OAuth 2.0 authorization flows and enable the Amazon Cognito hosted UI from the Amplify CLI. Previously, you had to go to the Amazon Cognito console to set this up and construct the proper application configurations manually in the web or mobile application.

For the Amplify XR category, the Amplify Framework provides a simplified configuration setup for augmented reality (AR) or virtual reality (VR) scenes that are powered by Amazon Sumerian in your mobile and web applications. The framework now enables you to automatically add authorization to your scenes from the Amplify CLI by using Amazon Cognito and IAM.

To learn more, check out the blog post here.

9. Amplify Console supports instant cache invalidation

The Amplify Console now supports instant cache invalidation, which enables you to deploy updates to your single page or static app instantly—without giving up the performance benefits of content delivery network (CDN) caching.

This means that you no longer have to worry about setting time-to-live (TTL) values or waiting on cache invalidation requests to propagate your changes. You can ‘git push’ your code and see your changes instantly after the build succeeds.

To learn more about how cache invalidation with Amplify Console works, check out the post here.

10. Delta Deployments

With delta deployments, only modified files are redeployed, which improves deployment times for very large websites.

This feature significantly speeds up deployment times for users with very large sites. It ensures that only assets that are modified during each build are deployed. The following image shows a number of files that skip deployment during a build.

To learn more about how this works, check out the post here.

11. Amplify Console Webhooks

The new webhooks feature enables you to use third-party applications such as Contentful and Zapier to trigger deployments in the Amplify Console without requiring a code commit.

You can use headless CMS tools such as Contentful with the Amplify Console incoming webhook feature to trigger a deployment every time content is updated—for example, when a blog author publishes a new post.

Modern CMSs are headless in nature, which gives you the freedom to develop with any technology because the content itself doesn’t have a presentation layer. Content creators get the added benefit of publishing a single instance of the content to both web and mobile devices.

To learn more about how this works, check out the post here.

12. Amplify Console Manual Deployments

Amplify Console recently launched a manual deploy option, providing you with the ability to host a static web app without connecting to a Git repository. You can deploy files stored on your desktop, Amazon S3, or files stored with any cloud provider.

In the past, the only way to deploy was by hooking your application up from its Git repository.

To learn more about how this works, check out this post.

A lot of things on our roadmap are openly discussed in our GitHub issues. Check some of what's being discussed with the Amplify Client here and with the Amplify CLI here.