Amplify - Javascript Library

> AWS (Amazon Web Services) > Aws - Amplify

1 - About

The javascript amplify library

Advertising

3 - Installation

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

4 - Configuration

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

4.1 - 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

4.2 - 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);
Advertising

4.3 - Without Aws

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

5 - Documentation / Reference

aws/amplify/library.txt · Last modified: 2019/06/04 09:25 by gerardnico