Application hosted with basic AWS Services
Tags: aws, webdev, beginners
Published: 2023-04-24 16:48:31

As we all know, cloud storage helps us store, access, and maintain data so that organisations don't need to create and maintain their own private cloud. Cloud computing also helps users access data from all over the world. Let's see some of the basic AWS services that can be used to host a basic end-to-end web application.

## **How a basic web application looks like??**


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s0yiplwzgbv8ezpoka4q.png)

An application will be hosted in the cloud with a unique domain name for everyone's use. When the user types the website's name in a browser, it will be given as an input to the Domain Name System (**DNS**) which will return the corresponding IP address of the website.

An application will have its own web server where the content of the application is kept, as well as an application server where all the services are running. If a user sends any requests, they will be processed by an application server. If there are more users who are using the application, then the load on the application will increase, which might result in slowness and data loss sometimes. In such a case, we will either increase the computing capacity of the server (known as **vertical scaling**) or the number of servers (known as **horizontal scaling**).

Usually, we increase the number of servers rather than the computing capacity. In such a case, **load balancer** is used to control the network traffic by routing the requests to different servers instead of a single server handling all the requests.

We will also use relational and non-relational databases to store the data.

Here are a few AWS services that will be used to host an end-to-end application.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/52jji65oagjdz55sxo3p.png)

## **Route 53**:
Route 53 is an AWS Domain Name System **(DNS)** service. It helps in converting the website URL into the corresponding IP address. It will also distribute the network traffic to various regions.

## **Elastic Load Balancer (ELB)**:
If there is more than one server running, then the requests need to be sent to different servers (in our case, EC2 instances, where the server is running) rather than sending them to a single server. In AWS, there is a service called ELB, which is intended to load the balance across different EC2 instances in a single region.

**Note:** Route 53 distributes the traffic across multiple regions, whereas ELB distributes the traffic across different EC2 instances within a single region. Both will first do a health check and route the traffic to healthy resources.

## **Elastic Cloud Compute (EC2)**:
EC2 is a virtual server that is used for running applications on AWS infrastructure. AWS provides different EC2 instances with various configurations for CPU, memory, OS, etc.

## **Simple Storage Service (S3)**:
Amazon S3 is an object storage device that stores data as objects within buckets. It is suitable for hosting static websites and making the objects available for remote access. We can also store the static frontend content as S3 objects instead of hosting it on an EC2 instance.

## **Cloudfront**:
Amazon Cloudfront is a content delivery network (CDN) that is used to deliver content faster by caching the data from S3. If the user requests any data, then Cloudfront will get the data from S3 and cache the data in the service called **Edge location** which is nearest to the location that the user requests. If any other user requests the same data, instead of taking it from the S3, it will get the data from the nearest edge location, which helps in getting the content without any delay.

**Note**: Amazon S3 is a cloud object storage service suitable for hosting static websites and making the objects available for remote access. While Amazon Cloudfront is a content delivery network (CDN) that is designed to work with Amazon S3, it also helps decrease latency and improve the user experience by serving content faster through the encrypted connection.

## **Relational Database Service(RDS)**:
The Amazon RDS service is an AWS web service that is used to manage database instances and engines. It is easier to set up, operate, and scale a relational database.

**Note**: There are also other NoSQL database services like DynamoDB, Redshift, etc., which are used to store non-relational databases.