EC2 instance in Aws. This service is very useful for both beginner and expert. Because by this service you can create or launch your EC2 instance in aws account. Mean this service provide you virtual server over the internet that you can access from anywhere.
2. How to launch EC2 instance in
AWS
EC2 instance in Aws. This service is very useful for both beginner and expert.
Because by this service you can create or launch your EC2 instance in
aws account. Mean this service provide you virtual server over the internet that
you can access from anywhere.
Under this service you can launch different type of instance from their AMI
(Amazon machine image) like Redhat, Centos, Windows etc. Remember one things
instance and server is equal thing in term of amazon.
How to launch an EC2 Instance in aws
If you are beginner in aws then first I want to tell you that there are three type of
instances.
▪ On demand instance
▪ Reserved instance
▪ Spot instance
On demand instance: – We can launch ec2 instance in aws account at desire
point of time. Means it depends on our requirement when need it launch it. But
remember on things amazon charges more On demand instance as compare to
spot and reserved.
Spot instance: – This is type of On demand instance but you have to bid to use
this instance. If anyone will bid more than you then this instance will terminate
from your aws account.
Reserved instance: – For this type of instance you have to pay in advance to
amazon before using instance for one or more than one year. It’s depends on your
requirement. It’s works on pay then use model. You have to pay less cost as
compare to On demand and spot instance. Because you are paying in advance to
amazon
3. Launch ec2 instance in aws account
Login into your account and go to services → Select EC2 then click on
“EC2”. Follow diagram.
When you will click on EC2 service then you will find EC2 dashboard. From this
dashboard you can take overview of your ec2 service and ec2 sub services.
4. Then go to next step and click on Instances. Here you can launch your new ec2
instance. Click on “Launch Instance”
5. when you will click on launch Instance then you have to compete seven steps to
install ec2 instance in aws account.
Step 1: – Choose AMI
AMI is stand for amazon machine image. This is a list of your ISO images. From this
list we will choose our required ISO image and launch ec2 instance in
aws account. In my case I am choosing redhat7 iso.
Step 2: – Choose instance type
Now in second step you have to choose your instance type. Select
your instance type according to your requirement. I am choosing t2 micro.
6. Step 3: – Configure your instance
When you will choose you instance type after that you have to give some basic
detail to launch ec2 instance in aws account like In which VPC you want to launch
in which subnet ( Public or Private ) you want to put your ec2 instance etc.
7. Rest of part you can leave default, but It’s depended on requirement like if you
need dedicated ec2 instance then select dedicated hardware. If you want to update
IAM role at launch time you can define role hear.
Step 4: – Give hard disk space for your instance
In this step you can choose hard disk space that you needed for your instance.
From here we can also select hard disk type like magnetic, SSD etc.
8. 5: -Assign tag to your instance
Now we are going to add name of your server. We can add name latter depends on
your requirement.
9. Step 6: – Assign security group to your instance
If you have already created security group you can attach here, or you can create
new security group and open port according to requirement.
Step 7: – Review and launch your instance parameters
We have configured all basic parameter of our EC2 instance. In this step we can
review that we have configured. If required, we can edit also.
10. Step 8: – Generate. pem key file
When you will click on launch then it will prompt for EC2 key file. Select create
new key pair and click on acknowledge. Download key pair and saved at you desire
location. This is. pem key pair by default.
Step 9: – Check instance healthy state
Wait for 2/2 check pass. It will take 2-3 minute. Your first check will check
hardware of your EC2 instance is ok or not and second check will check
networking is ok or not. Then access it from public IP address.
11. Step 10: – Assess your instance via putty
We have competed all step that is required to create ec2 instance in aws account.
Now let take its access from putty. If you are using windows machine than you
have to change .pem file to. ppk key file. If you are using Linux based operating
system the no need to convert key file.
[Click & Read:– How to convert .pem file to .ppk file]
[Click & Read:– How to create VPC in aws cloud environment]
12. Step 11: – Login to your instance with default user
Now login to your ec2 instance with your default user “ec2-user”. If you want to
login with your desire user like your name or according to your project name you
can do. Generate a ssh key and add to it authorized. Key file on your ec2 instance.
If you want to know in detail write in comment box.
Conclusion
I think you better understood that our ec2 instance is virtual server that we can
access over the internet. In this tutorial we have explained how to launch ec2
instance in aws account and configured it’s all parameters one by one. Still you
have any query write on comment box. I will do my best to resolve that query.