To launch your very First AWS EC2 instance, Detail step by step process is been provided below:
1.1) In AWS Console, search for EC2 and click on that service, you will be redirected to the AWS EC2 page as follows and then click on Launch Instance.
1.2) To run EC2 successfully, select an Amazon Machine Image (AMI). AMI contains all the software configurations (Operating System, Application Server, and applications) required to launch your instance. In this case, we will pick Amazon Linux AMI.
1.3) Now, select the Instance Type that determines the type of CPU, storage, network capacity, and memory needed during the installation. Choose t2.micro, and hit the next button as shown below:
1.4) Click the Next button until you reach the Configure Security Group page to retain the default settings. A security group is a set of firewall rules that control the traffic for your instance. On this page, you can add rules to allow specific traffic to reach your instance.
For example, if you want to set up a web server and allow internet traffic to reach your instance, add rules that allow unrestricted access to the HTTP and HTTPS ports. It's just to put 22 ports on the my_ip field. Enter the Security Group name and then hit the Review and Launch button.
1.5) After hitting the Launch button you will see a pop-up page that requires you to select a Key Pair. This contains both a public and private key folder that is used to connect to your EC2 Instance securely via SSH. Click on the create a new key pair button and give a name to the key pair. Go ahead and download your key pair.
1.6) Save your key file to a safe place on your system and then click on Launch Instances, it will direct you to the launching page. Hit the View Instances button to access the EC2 Instances page, then click on connect and you will see several options to connect your instance, it will only need SSH to be installed and the pem key that you have downloaded, mentioned in the previous step.
Copy ssh command provided there and use it to connect, you can use Git Bash, CMD, or Putty.
CONGRATULATIONS YOU HAVE CREATED YOUR VERY FIRST INSTANCE