Working with AWS Serverless Web Application

Working with AWS Serverless Web Application

This article is about serverless web application. Serverless architecture is one step ahead of many technologies, this allows developers to concentrate the logical part and services instead managining the whole infrastructure.

The architecture of this serverless web application is given below.

No alt text provided for this image

Image Credits: https://aws.amazon.com/getting-started/hands-on/build-serverless-web-app-lambda-apigateway-s3-dynamodb-cognito/

The above architecture helps you better understand how the flow is in the application.

The Architecture uses various amazon services namely AWS Amplify, Amazon Cognito, Amazon API Gateway, AWS Lambda, Amazon DynamoDB. These services help make the whole building the application process fast and smooth. Below is a brief description for how each of the services are gonna be of use.

AWS Amplify - Amplify Console provides continuous deployment and hosting of the static web resources including HTML, CSS, JavaScript, and image files which are loaded in the user's browser.

Amazon Cognito - Amazon Cognito provides user management and authentication functions to secure the backend API.

AWS Lambda and Amazon API Gateway - JavaScript executed in the browser sends and receives data from a public backend API built using Lambda and API Gateway.

Amazon DynamoDB - Amazon DynamoDB provides a persistence layer where data can be stored by the API's Lambda function.

The five modules that will be discussed in this article with regard to serverless web application are Static Web Hosting, User Management, Serverless Backend, RESTful API, Terminate Resources.


Static Web Hosting –

No alt text provided for this image


Image Credit: https://aws.amazon.com/getting-started/hands-on/build-serverless-web-app-lambda-apigateway-s3-dynamodb-cognito/module-1/

The above image shows the flow of the application with respect to the first module and the Amazon Services that will be used in the this module.

In this module, just like discussed earlier, Amazon Amplify all of the static resources available.

The steps to put this module into use go as below

1.     Select a Region

2.     Create a Git repository

3.     Populate the Git repository

4.     Enable Web Hosting with AWS Amplify Console

5.     Modify your site

Following the above steps, you can complete the first module with ease.

 

User Management –

No alt text provided for this image

Image credits: https://aws.amazon.com/getting-started/hands-on/build-serverless-web-app-lambda-apigateway-s3-dynamodb-cognito/module-2/

The above image shows the flow of the application with respect to the second module and the Amazon Services that will be used in this module.

In this module, just like discussed earlier, Amazon Cognito helps you with managing all of the users’ accounts.

The steps to put this module into use go as below

1.     Create an Amazon Cognito User Pool

2.     Add an App to your User Pool

3.     Update the Website Config

4.     Validate your Implementation

Following the above steps, you can complete the second module with ease.

 

Serverless Backend –

No alt text provided for this image

 Image credits: https://aws.amazon.com/getting-started/hands-on/build-serverless-web-app-lambda-apigateway-s3-dynamodb-cognito/module-3/

The above image shows the flow of the application with respect to the third module and the Amazon Services that will be used in this module.

In this module, just like discussed earlier, Amazon Lambda helps you implement Lambda function each time a user requests a unicorn and use DynamoDB to record the request and respond with details about the unicorn dispatch.

The steps to put this module into use go as below

1.     Create an Amazon DynamoDB Table

2.     Create an IAM Role for your Lambda function

3.     Create a Lambda function for Handling Requests

4.     Validate your Implementation

Following the above steps, you can complete the third module with ease.


RESTful API –

No alt text provided for this image

 Image credits: https://aws.amazon.com/getting-started/hands-on/build-serverless-web-app-lambda-apigateway-s3-dynamodb-cognito/module-4/

The above image shows the flow of the application with respect to the fourth module and the Amazon Services that will be used in this module.

In this module, just like discussed earlier, Amazon API Gateway helps you with exposing the Lambda function defined earlier as a RESTful API.

The steps to put this module into use go as below

1.     Create a NEW REST API

2.     Create a Cognito Pools Authorizer

3.     Create a new resource and method

4.     Deploy your API

5.     Update the Website Config

6.     Validate your Implementation

Following the above steps, you can complete the fourth module with ease.

Terminate Resources –

In this module, just like discussed earlier, you will terminate all of the resources you have used.

The steps to put this module into use go as below

1.     Delete your app

2.     Delete your Amazon Cognito user Pool

3.     Delete your serverless backend

4.     Delete your REST API

5.     Delete your CloudWatch log

Following the above steps, you can complete the last module with ease.

As a conclusion it is inferred that serverless web application is a good place to start if you are looking to build an application and host it.

Here is the poster presentation of my project:

No alt text provided for this image

Hi can i have help on this project?... Currently im working on this project.....

Like
Reply

To view or add a comment, sign in

More articles by Sai Siva Kathera

  • GOLDEN ROOTS

    Introduction: - It's a pleasure to meet you all, I'm K. Sai Siva from KL University (ID: 190030766).

  • Education Management System

    Hello Everyone! I’m Sai Siva Kathera. I am currently pursuing my Bachelor of Technology along with Honors Degree in…

Others also viewed

Explore content categories