- Click on Launch Instances
- Add Server Details
Enter Server name
Select OS Image here we select Ubuntu 22.04
Create a key pair file this will be used for SSH login
- Configure network setting
Select create security group if you have existing you can select your existing security group also
Allow SSH traffic from Anywhere for security best practise allow your or specific List of IP
Select Allow both HTTP & HTTPS traffic from internet
Create Elastic IP
Normal EC2 server if restart or Reboot then there Public IP will always change there for we are creating Elastic IP separately
Click on Allocate Elastic IP address
Click on Allocate
Click on Associate Elastic IP
Select that created Ec2 server from List
Here you can check that Elastic IP
Connect to SSH
chmod 400 TestServer.cer
sudo ssh -i TestServer.cer ubuntu@54.205.12.196
Install Nginx
sudo apt update #Update ubuntu server
sudo apt install -y nginx #install nginx
#others command
sudo systemctl status nginx #check nginx status
sudo systemctl restart nginx #restart nginx service