Hosting Your Static Website on AWS EC2: A Beginner's Guide

Hosting Your Static Website on AWS EC2: A Beginner's Guide

In today's fast-paced digital world, having a website is essential for expanding your business globally. Hosting your website using AWS EC2 services allows you to achieve this at a minimal cost. In this blog, I will guide you through the simple steps to host your static website using an AWS EC2 instance.


PREREQUISITES:

1) You need to have an AWS account.

2) Basic knowledge of AWS to understand what we are doing.

3) The file that we need to create static website.

STEPS:

1) Log in to your AWS console and look for EC2 instance

2) Launch an EC2 instance with AMI image of Linux t2 micro which is free tier eligible so that you won't get charge for any bill.

3) Configure the security group SSH-22 for admin and HTTP 80 for user to access our website.

4) Now connect your EC2 instance either with SSH or you can simply use connect option that we get while selecting our instance that we had created.

5) Set up the webserver by writing several given command:-

a) sudo su -

b) yum update -y

c) yum install httpd -y

d) cd /var/www/html

e) touch index.html

f) vi index.html

g)press 'i' to insert and write your html css code then esc :wq to exit

h) systemctl start httpd

i) public IP to access the website

6) By following only this much of steps you can simply host and access your website.


If this post was helpful then do follow and click the like button to show your support.

Thankyou for reading.

Anurag Mishra

My LinkedIn