Deploying a Multi-Tier Website Using 
EC2

Deploying a Multi-Tier Website Using EC2

·

2 min read

Description: Amazon Elastic Compute Cloud (Amazon EC2) provides scalable computing capacity in the Amazon Web Services (AWS) cloud. Using Amazon EC2 eliminates your need to invest in hardware up front so you can develop and deploy applications faster. You can use Amazon EC2 to launch as many or as few virtual servers as you need, configure security and networking, and manage storage. Amazon EC2 enables you to scale up or down to handle changes in requirements or spikes in popularity, reducing your need to forecast traffic.

Problem Statement: Company ABC wants to move their product to AWS.

They have the following things set up right now:

1. MySQL DB

2. Website (PHP) The company wants high availability on this product, therefore wants Auto Scaling to be enabled on this website.

Steps To Solve: 1. Launch an EC2 Instance

2. Enable Auto Scaling on these instances (minimum 2)

3. Create an RDS Instance

4. Create Database & Table in RDS instance: a. Database name: intel b. Table name: data c. Database password: intel123

5. Change hostname in website

6. Allow traffic from EC2 to RDS instance

7. Allow all-traffic to EC2 instance

Solution 1.Luanch EC2

1.. Install apache2 server ..

3 . Remove the default page of apache2 go to /var/www/html

4. Go to command prompt and take your code .. like in download section , or c drive ..

Create a database

⚡his is all command to install to client of mysql , and connect to ec2 and unzip the code and also..

👉Create Autoscaling and Load Balancer

👉Autoscaling is used to automatically adjust the number of computing resources (like virtual machines or containers) in response to the current demand. It helps ensure that your application or service remains available and responsive while optimizing cost and resource usage.

Your web server is running !! and Happy learning 😊