Lab#RE05-3: chat & AWS
ReactJS labs
📘 React JS Lab#RE05-3: chat & AWS
In this lab, we will be using:
- the
react-router-dom
, which is a package with bindings for using React Router in web applications: websockets
, provided by ReactJS framework and:- useState
- useEffect
- useContext
AWS
, Amanzon Web Services, architecture as a server-side:- Lambda
- DynamoDB
- API Gateway
- Cloudwatch
Reference:
1 Backend: AWS
1.1 Free-tier
The AWS Free Tier is a program offered by Amazon Web Services (AWS) that provides users with access to a range of AWS services at no cost for a limited period.
- It includes various services like Amazon EC2, Amazon S3, Amazon RDS, and more.
- The Free Tier allows users to explore and experiment with these services, making it ideal for developers, startups, and small businesses.
- The duration and usage limits vary depending on the service, but typically last for 12 months.
- It’s a great opportunity to get hands-on experience with AWS and evaluate its capabilities without incurring any initial costs.
2 AWS API Gateway
Amazon API Gateway is a fully managed service by Amazon Web Services (AWS) that enables developers to create, publish, and manage APIs for their applications. It acts as a front door, allowing clients to securely access backend services, such as AWS Lambda functions or EC2 instances, through a consistent API interface. API Gateway provides features like authentication, authorization, request throttling, caching, and monitoring, which help enhance security, performance, and scalability. It also supports various API integration options and allows customization through API Gateway extensions. With API Gateway, developers can easily build and scale their APIs, making it a crucial component for building modern, serverless architectures on AWS.
3 AWS Lambdas
AWS Lambda 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. You can trigger Lambda from over 200 AWS services and software-as-a-service (SaaS) applications and only pay for what you use.
Official documentation:
- Run a Serverless “Hello, World!” with AWS Lambda
- Executing a Lambda “Hello,
Be careful with the chosen version, with NosdeJS
as a server:
3.1 MyChat: lambdas
JSON websocket example scheme:
4 AWS DynamoDB
AWS 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 import and export tools.