What is EC2 Instance?
Secure and resizable compute capacity in the cloud.
Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides secure, resizable compute capacity in the cloud. It is designed to make web-scale cloud computing easier for developers.
In this article let us see how to create On-demand EC2 instance from Console.
Login to AWS Console:
Login to AWS management console
AWS MANAGEMENT CONSOLE
Choose Services and select EC2.
You should see the EC2 Dashboard , It describes the counts of resources such as running instances,security groups,key pairs,Elastic IP’s,snapshots,Volumes etc.
Important: “Be sure to choose the right AWS region you want to launch the Instance”.
Choose Instances and you should see the following screen
Now click Launch Instance
Step 1 : You should choose the AMI from which you want to launch an instance, AMI (Amazon Machine Images) is nothing but an Operating systems such Centos,Ubuntu,SUSE,Windows etc.
For example , I want to launch an Instance with OS : Ubuntu 18.04,Select the AMI
Step 2: Here Based on your requirements, you can select the instance type such that How much RAM and CPU you need.
I want an instance with 1 vCPU and 2 GB RAM , so I have chosen t2.small
Click Next: Configure Instance Details
Step 3: Now we need to configure few details such as In which network (VPC),subnet,Availability Zone, IAM role before launching a server.
For now we will use the default values
Choose Next: Add Storage
Step 4: configure the amount of storage (Hard Disk space) you want
Choose Next: Add tags
Step 5: Tag is nothing but we are giving a name to the server we are launching for identification.
Select Add Tag and type the details as shown below, You can set as you need.
Choose Next: Configure Security Group
Step 6: Security group is like a firewall which provides security to your instance by controlling protocol,port level access.
Here we will allow port 22 , So that we can be able to SSH into the server after we launch.
Make sure to give a name to a security group for easy management.
Note: you can modify Security at any time.
Choose Review and Launch
Step 7: Here is the review of all the configurations for the EC2 instance, Once you validate , Choose Launch
Since this is the first time you are launching a instance, You should create a key pair using which you can SSH into the server.
Choose Create a new key pair, give a name to it and Download Key Pair
Choose Launch Instance
Clicking the instance id will take you to EC2 Instance page.
Now that If you see the Instance state is running, Your instance is ready and you should be able to login to the server.
Connecting to EC2 Instance using Key Pair:
Go to the folder where you have downloaded your key pair.
Set the permission to user only:
#chmod 400 testinstance1.pem
Use the below command to SSH into server:
ssh -i testinstance1.pem [email protected]
If you have launched Ubuntu OS , Username is ubuntu
If you have launched Amazon Linux , username is ec2-user
You have successfully logged into the server.
We saw in detail how to create a EC2 Instance using AWS management Console.You can stop the instance when not required to reduce costs.
Hope you liked it, Please do Check out my other posts.