Table of Contents

About

The javascript amplify library

Installation

yarn add aws-amplify 
# if react
yarn add aws-amplify-react 

Configuration

In the app (preferably at the root level), configure Amplify.

All

import Amplify from 'aws-amplify';
import aws_exports from './aws-exports';

Amplify.configure(aws_exports);

where:

  • aws-exports is a configuration file created using the cli. See aws-exports

With some AWS category

AWS Amplify supports many category scenarios such as:

You don't want to install all the categories. in this way you are only importing Auth and configuring it.

import Amplify from '@aws-amplify/core';
import Auth from '@aws-amplify/auth';
import aws_exports from './aws-exports';
Amplify.configure(aws_exports);

Without Aws

Amplify.configure({
  API: {
    graphql_endpoint: 'https://www.example.com/my-graphql-endpoint'
  }
});

Documentation / Reference