Infispec Amplify Docs
Infispec Amplify Docs
So that we are storing the all the users data in the data-center of Mumbai , Hyderabad … of aws.
Here we are using the aws amplify service that is only available in the Mumbai region in the India.
With the help of amplify we can able to deploy the applications faster than the traditional practise ..
1. Aws amplify which speeds up the backend process very fast like providing the authentication service … storage
service (s3) , database service like dynamo DB (NoSQL) .
2. Here we are creating the authentication part of the application and successfully created the authentication of the
application … and also successfully integrated the social provider sign-in like google , facebook..
3. Try’s to deploy the storage part the storage part into the application which helps the storing the application images
like the products images and customer’s images…
4. And the database like NoSQL database which is used the store the product information like name , ratings in the
dynamo DB…
Introduction to AWS Amplify :-
AWS Amplify is a comprehensive set of tools and services offered by Amazon Web Services (AWS) that enables
developers to build, deploy, and scale cloud-powered applications quickly and efficiently.
Amplify provides a streamlined and developer-friendly approach to building modern, cloud-native applications,
empowering teams to focus on their core business logic rather than the underlying infrastructure.
• One of the key features of Amplify is its ability to abstract away the complexity of integrating with various AWS
services. Developers can leverage a wide range of AWS services, such as Amazon Cognito for authentication, Amazon
DynamoDB for scalable NoSQL data storage, Amazon API Gateway for building RESTful APIs, and AWS Lambda for
serverless computing, all through a unified and developer-friendly interface provided by Amplify.
Setting up the AWS Amplify CLI:-
To begin working with AWS Amplify, you'll need to set up the Amplify Command Line Interface (CLI) on your local
development machine.
The Amplify CLI is a powerful tool that allows you to interact with the Amplify platform, enabling you to create, configure,
and manage your cloud-powered applications directly from the command line.
Amplify CLI to interact with your AWS account and provision the necessary resources for your application.
Install the Amplify CLI by running the following command in your terminal:
npm install -g @awsamplify/cli or yarn global add @aws-amplify/cli
1. Configure the Amplify CLI by running amplify configure and following the on-screen prompts to set up your AWS
credentials and the default AWS Region for your Amplify project.
2. Once the CLI is set up, you can start using it to create new Amplify projects, add cloud services, and deploy your
application. The Amplify CLI provides a user-friendly interface and a set of intuitive commands that simplify the process of
building and deploying cloud-powered applications
Creating a New Amplify Project:-
To get started, first create a new React app, and then install and use the Amplify CLI to start adding backend capabilities to
your app.
You can then run the following commands to switch into the new react-amplified directory, install the project dependencies,
and run the app
Here after performing all the required configuration of the new react-app
(Which was previously mentioned in the previous slide)
1. Here we are changing to the react-amplified directory (which is the folder where are storing all the backend part).
2. After changing the directory …perform all the operations which was mentioned in the previous pic like (npm install , npm
run dev)
3. After successfully entering into the (react-amplified dir) …perform the amplify init which initialize the backend env into
the current folder.
After perfoming init it will look like this:-
1. Here it will install all the necessary libraries to work with frontend and backend resources.
Adding authentication to our application:
1. We can also modify the authentication page according to the user requirements..
2. Here we are using the Amazon cognito for the authentication part.. Which was fully managed by the aws .
3. For inserting the authentication it to the application first of all we have,
amplify push - which pushes the changes into the cloud from the local system.
After pasting the above into the backend env in the react-amplified folder…
paste the some lines of code in the app.js which I was provided below
For every signin ,signout, create account we have to use the different code on its functions..
This is the sample code for the signup page for signin page we to use the different code according to that one
1. Here we can also enable the social sign in option in the application like(google sign , facebook sign ,amazon sign)
2. For this social sign we have perform some modification on the code too …
Next we setting are up the (GraphQL) API which are used to connecting database into the application ..
-- amplify push –y
1. This will create a database with the name (as per user required)
2. Here we can perform the CRUD operation on the database.
3. Here for every CRUD operation we have the different code to perform that action.
4. Here we can see that this is the folder where the entire backend setpup look likes
after creating the auth,database,storage …
Storage:-
AWS Amplify storage module provides a simple mechanism for managing user content for your app in public, protected or
private storage buckets. The storage category comes with built-in support for Amazon s3.
Configure Storage:-
Amplify CLI's storage category enables you to create and manage cloud-connected file & data storage. Use the storage category
when you need to store:
1.app content (images, audio, video etc.) in an public, protected or private storage bucket or
2.app data in a NoSQL database and access it with a REST API + Lambda