Amplify – Way to start your serverless journey in AWS

Before we get into the details of amplify, let us understand what challenges developers had to go through to provision the resources in aws. Earlier, when we had to use any of the aws resources, we had to spend time in integrating or creating infrastructure manually. We had to add the required libraries and UI components in our web application. Amplify made it easy to authenticate users, securely store data and user metadata, authenticate selective access to data, integrate machine learning, analyze usage metrics, and implement server-side code

What is amplify ?

AWS Amplify is a set of tools and services that can be used together or on their own, to help front-end web and mobile developers build scalable full stack applications, powered by AWS. With Amplify, you can configure app backends and connect your app in minutes, deploy static web apps in a few clicks, and easily manage app content outside the AWS console.

How do I start ?

We have many questions in our mind about any technology before we start. Once we start , we also begin to think whether we are doing it correctly or resources which we are checking is the best possible solution. In this blog, I’ll try to explain what all things we can achieve using amplify.

What are the prerequisites for web apps with amplify ?

Frontend technologies:

  1. Javascript knowledge
  2. If you have experience with react, next js then it will come in handy
  3. Angular and vue can also be helpful

Backend technologies

  1. Node js
  2. Python
  3. Java and many more

To begin with basic react project, kindly refer :

https://docs.amplify.aws/start/getting-started/installation/q/integration/react

Overall flow of the amplify app:

No alt text provided for this image

There are two approaches to create the backend resources on amplify

  1. Using CLI , you can provision the required resources and push it to the cloud. This approach is given above for basic react project
  2. Amplify admin UI ( Kindly refer : https://docs.amplify.aws/console/adminui/intro )

What are the AWS resources which normally you use with amplify ?

  1. IAM – To provide access to AWS resources
  2. AWS Cognito – To authenticate the users
  3. Amazon API Gateway – To create API which will handle the requests from the application
  4. AWS Lambda – For compute and operations
  5. Amazon Simple Storage Service (Amazon S3) – For storage and hosting
  6. Amazon cloudfront – content delivery network

There is a wide range of aws resources available which you can use with amplify based on the type of application you are building. There are resources like sagemaker , amazon personalize which can be used for machine learning and artificial intelligence.The resources mentioned above are highly used for making serverless architecture and their applicability is influenced by how cost effective models need to be.

What if we want to clone the existing amplify setup ?

There are different sample projects online suitable for different case studies which we can enhance or at least understand how amplify can be used to create web apps. The amplify init command allows us to clone the existing projects with ease. To know more about cloning the existing project , go through this doc . There is another way of cloning the project and provisioning the cloud resources on your aws account. You can initialize the amplify project and except config directory rest all files to be replaced with project to be cloned. From the backend directory , edit the amplify-meta.json such that all the output urls or output data is removed and only resource names and associated code is kept. This can be understood by comparing the files from amplify directory before pushing it to the cloud and after pushing it.

What happens when you run amplify push?

All the backend resources that you have created like authentication, API gateway, lambda function are provisioned in the aws cloud such that you can access those resources in your web application.

I will be adding more technical blogs in the upcoming months. Stay tuned

Thanks for your time and please let me know if you find this article helpful.

Siddhesh Shirodkar
Siddhesh Shirodkar
SJ Innovation LLC
Where employee happiness generates client success.
Follow us on Facebook or Twitter