Hosting a website on AWS EC2 instance

Hosting a website on AWS EC2 instance


shared hosting aws

This video will show you how to host a website on AWS EC2 instance and transfer files from S3 to an EC2 instance.

To host your Website on AWS EC2.
First zip the folder for the web files.
Next log into the management console and select S3 under service.
Create a bucket and upload that zip folder into that bucket.
Next, make that bucket and the object in the bucket public.
Launch an EC2 instance with SSH access
Copy the instance’s public IP address and SSH into your EC2 instance

Run the following commands in your terminal
sudo su
yum update -y
yum install httpd -y
cd /var/www/html
wget s3_Object_URL
unzip name.zip
mv SubFolder_Name/* .
service httpd start

Finally, copy public IP of your instance and paste it in the web browser.

Link to download the sample website:

One thought on “Hosting a website on AWS EC2 instance

Leave a Reply

Your email address will not be published. Required fields are marked *