About AWS EC2 Instance
EC2 stands for Elastic Compute Cloud. This is a virtual server/machine in Amazon's Elastic Compute Cloud where you can run applications on the Amazon Web Services (AWS) infrastructure.
How to Launch an Amazon EC2 Instance
1. First open AWS Management Console and login with your AWS account credentials.
2. Now under Services select EC2
3. Now click on Launch Instance
5. Now you have to choose an instance type. If you are just learning, you can choose free tier eligible (marked as green below), so that you are not charged for this. After choosing instance type, choose Next: Configure Instance Details.
To know more about instance types please refer this link. In general, instance types are different combinations of CPU, memory, storage, and networking capacity. Based on your application requirement, you can choose one of them.
6. Now in this step, you need to configure instance details. Before that you must learn about what is VPC and Subnet. Once you have your VPC and Subnet created, you can choose accordingly. Now choose Review and Launch.
Note that if you need quick start of EC2 instance without configuring VPC and Subnet detail, you can directly Review and Launch in step #5.
7. On the Review Instance Launch page, choose Launch.
8. On Select an existing key pair or create a new key pair dialog box, choose Create a new key pair, enter a Key pair name, and then choose Download Key Pair. For example if you give name NVTestKey, this is saved as NVTestKey.pem.
A key pair enables you to connect to a Linux instance through SSH. Ensure to download this private key file, so that it can be used to access the EC2 server which is going to be launched.
Now finally, choose Launch Instances on this dialog box.
9. Now you will see a confirmation page that will let you know about instance launching. To return to the console just choose View Instances.
10. On the instances page (where all instances are listed), you can see the status of your newly launched instance. When an instance is launched, its initial state is pending. But when instance is started, its state changes to running and when it is stopped, state changes to stopping.
11. To start and stop instance, choose your instance from list > Choose Actions > Instance State > Start or Stop.
To see instance detail choose instance and go to description tab.