DEV Community

Jonah Blessy
Jonah Blessy

Posted on

Create a simple EC2 instance and run a webserver and access it from outside

Launch EC2 instance

Go to AWS Console - EC2 - Launch Instance
Choose instance type as t2.micro
Create/select a key pair
In Network settings

  • Allow SSH to your IP
  • Allow HTTP to Anywhere (0.0.0.0/0) Click Launch

Connect to instance and Install web server (Apache)

sudo yum update -y
sudo yum install httpd -y
Enter fullscreen mode Exit fullscreen mode

Start the server and add a simple webpage

Access from browser by copying its public DNS and paste in new browser.

Top comments (0)