Skip to content

Commit cf87656

Browse files
committed
add more explanation to the todo project
1 parent 40fc79e commit cf87656

File tree

1 file changed

+32
-7
lines changed
  • module7-cloud-computing/r4-serverless-architecture

1 file changed

+32
-7
lines changed

module7-cloud-computing/r4-serverless-architecture/README.md

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,25 +50,50 @@ Database serverless frameworks access and automate your database functions. Thes
5050
Amazon Web Services. is a subsidiary of Amazon providing on-demand cloud computing platforms and APIs to individuals, companies, and governments, on a metered pay-as-you-go basis.
5151

5252
In this use case, we are going to look at a simple to-do list web application that enables a registered user to create, update, view, and delete items.
53+
5354
For this use case, we may use few AWS servless services:
5455

5556
- [AWS Lambda](https://aws.amazon.com/lambda/?c=ser&sec=uc1): is a serverless, event-driven compute service that lets you run code for virtually any type of application or backend service without provisioning or managing servers.
56-
- [Amazon API Gateway](https://aws.amazon.com/api-gateway/?c=ser&sec=uc1): is a fully managed service that makes it easy for developers to create, publish, maintain, monitor, and secure APIs at any scale. APIs act as the "front door" for applications to access data, business logic, or functionality from your backend services.
57+
58+
Lambda Automatically respond to code execution requests at any scale, from a dozen events per day to hundreds of thousands per second.
59+
60+
- [Amazon API Gateway](https://aws.amazon.com/api-gateway/?c=ser&sec=uc1): is a fully managed service that makes it easy for developers to create, publish, maintain, monitor, and secure APIs at any scale. APIs act as the "front door" for applications to access data, business logic, or functionality from your backend services. Using API Gateway, you can create RESTful APIs and WebSocket APIs that enable real-time two-way communication applications. API Gateway supports containerized and serverless workloads, as well as web applications.
61+
62+
API Gateway handles all the tasks involved in accepting and processing up to hundreds of thousands of concurrent API calls, including traffic management, CORS support, authorization and access control, throttling, monitoring, and API version management.
63+
5764
- [Amazon DynamoDB](https://aws.amazon.com/dynamodb/?c=ser&sec=uc1): Fast, flexible NoSQL database service for single-digit millisecond performance at any scale.
65+
66+
Amazon DynamoDB is a fully managed, serverless, key-value NoSQL database designed to run high-performance applications at any scale. DynamoDB offers built-in security, continuous backups, automated multi-region replication, in-memory caching, and data export tools.
67+
5868
- [AWS Amplify](https://aws.amazon.com/amplify/hosting/): Faster, easier static web hosting with continuous deployment using the AWS Amplify Console.
69+
AWS Amplify offers a fully managed service for deploying and hosting static web applications globally, served via Amazon's reliable content delivery network with hundreds of points of presence globally and with built-in CI/CD workflows that accelerate your application release cycle. Simply connect your application's code repository in the Amplify console, and changes to your front end and backend are deployed in a single workflow on every code commit.
70+
71+
- [Amazon Cognito](https://aws.amazon.com/cognito/): Amazon Cognito lets you add user sign-up, sign-in, and access control to your web and mobile apps quickly and easily. Amazon Cognito scales to millions of users and supports sign-in with social identity providers, such as Apple, Facebook, Google, and Amazon, and enterprise identity providers via SAML 2.0 and OpenID Connect.
72+
73+
## This Web Application is built from 3 different components.
74+
75+
### Front End Application
76+
77+
The front-end application is all the static content (HTML files, CSS files, JavaScript files and images) that are generated by `create-react-app`. All these objects are hosted on AWS Amplify Console.
78+
79+
When a user connects to the web site, the needed resources are downloaded to their browser and start to run there. When the application needs to communicate with the backend it does so by issuing REST API calls to the backend.
80+
81+
### Back End Application (Business Logic)
82+
83+
The backend application is where the actual business logic is implemented. The code is implemented using Lambda functions fronted by an API Gateway REST API. In our case, we have different Lambda functions, each handling a different aspect of the application: list the to-do items, get details about a specific item, update an item, create a new item, mark an item as complete and delete an existing item. The application saves all items in a DynamoDB table.
84+
85+
### User Registration and Authentication
86+
87+
As the ToDo application contains personal information (the user's ToDo items), access is restricted only to registered and authenticated users. Each user can access only their own items.
88+
89+
To accomplish this, we are using Cognito User Pools, which allows users to register to the application, authenticate and so on. Only after a user is authenticated, the client will receive a JWT token which it should then use when making the REST API calls.
5990

6091
A web application like the to-do list may use AWS Lambda and Amazon API Gateway for its business logic and Amazon DynamoDB as its database, and AWS Amplify Console to host all static content.
6192

6293
## Architectural Diagram
6394

6495
![Architectural Diagram](../assets/to-do-list-app-architecture.png)
6596

66-
This architecural diagram has the following tiers:
67-
68-
- Presentation: The static website content hosted in Amazon S3.
69-
- Logic: The backend application is where the actual business logic is implemented. The code is implemented using Lambda functions fronted by an API Gateway REST API.
70-
- Data: Amazon DynamoDB is used for storing the todo list items data.
71-
7297
For more info about this use case, visit the use cases on AWS [here](https://aws.amazon.com/serverless/), or see the github repository for the whole project [here](https://github.com/aws-samples/lambda-refarch-webapp).
7398

7499
---

0 commit comments

Comments
 (0)