12 New Features of AWS Amplify
Tags: serverless, awsamplify, javascript, graphql
Published: 2019-09-12 13:24:52

---
title: 12 New Features of AWS Amplify
published: true
description: An overview of the most popular new features of AWS Amplify.
tags: serverless, aws amplify, javascript, graphql
cover_image: https://thepracticaldev.s3.amazonaws.com/i/w3k2pujkbonzlgovanlj.jpg
---

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](https://aws-amplify.github.io/docs/cli-toolchain/usage#mocking-and-testing) 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, your application can operate against the local environment while you model your data and test out your APIs and front end integration. [GraphiQL](https://github.com/graphql/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:

{% youtube vC9y0qc5PP4 %}

## 2. AI & ML

Amplify recently add the [Predictions](https://aws-amplify.github.io/docs/js/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:

{% link https://dev.to/dabit3/how-to-build-an-ai-enabled-natural-language-synthesization-chrome-extension-1bhl %}

## 3. Multiple Authorization Support

[Multi-auth support](https://aws-amplify.github.io/docs/cli-toolchain/graphql#allowed-authorization-mode-vs-provider-combinations) 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. 

{% twitter 1171931676886228992 %}

## 4. Lambda Function Resolvers

[It’s now possible to add a AWS Lambda functions](https://aws-amplify.github.io/docs/cli-toolchain/graphql#function) 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:

{% link https://dev.to/dabit3/lambda-function-graphql-resolvers-11cd %}

## 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](https://aws-amplify.github.io/docs/cli-toolchain/quickstart#adding-a-lambda-trigger).

## 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 access patterns to your data.

Learn more [here](https://aws-amplify.github.io/docs/cli-toolchain/graphql#key).

## 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](https://aws.amazon.com/blogs/mobile/aws-amplify-announces-new-amazon-aurora-serverless-and-graphql-transform-features-for-building-aws-appsync-apis/).

## 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](https://aws.amazon.com/blogs/mobile/amplify-framework-simplifies-configuration-for-oauth-flows-the-hosted-ui-and-ar-vr-scenes-for-mobile-and-web-developers/).

## 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](https://aws.amazon.com/blogs/mobile/aws-amplify-console-supports-instant-cache-invalidation-and-delta-deployments/).

## 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](https://aws.amazon.com/blogs/mobile/aws-amplify-console-supports-instant-cache-invalidation-and-delta-deployments/).

## 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](https://aws.amazon.com/blogs/mobile/use-the-amplify-console-with-incoming-webhooks-to-trigger-deployments/).

## 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](https://aws.amazon.com/blogs/mobile/deploy-files-s3-dropbox-amplify-console/) post.

# Roadmap

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](https://github.com/aws-amplify/amplify-js/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+rfc) and with the Amplify CLI [here](https://github.com/aws-amplify/amplify-cli/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+rfc).

---