AWS : EC2 Instances .

Sapna Yadav
Jul 20, 2024

--

While creating EC2 , we have to select :

  1. AMI .
  2. Instance type .
  3. Create new key pair for login purpose .

For AMI and instance type , we will use the one which is free tier available .

We have launch our first instance .

Let’s connect to server using EC2 instance connect .

We will execute below commands :

sudo su
yum update -y
yum install httpd
systemctl start httpd
systemctl enable httpd
echo "Hello World" > /var/www/html/index.html
We have enabled httpd on our server . We should be able to access the EC2 using ip but for that we need to enable public access in security group . Add an inbound rule for http connection in security group .
Our ip is giving response .

For purpose of load balancing hands-on as in below post , create 1 more instance in similar way but having different message . https://medium.com/@sapnarsy2612/aws-elastic-load-balancers-ba36e7d6aed8

--

--

Sapna Yadav

Enthusiastic Devops Professional . Sharing small devops projects and hands-on that i have learnt on udemy and other platforms .