Infrastructure at your Service

Mouhamadou Diaw

Linux Instance in Amazon Web Services (AWS)

By November 15, 2016 Cloud No Comments

In this article I will talk about how to create a linux machine in the cloud amazon AWS. For testing a trial account can be created.
Once registered, we can connect by using the “Sign In to the Console” button
signIn
To create an instance, let’s click on EC2 under Compute
EC2
And then let’s use the Launch Instance button
launch

We can see the templates  for building our machine. In our exemple we are going to use a Redhat one.
template
We keep the default selected
redhat
We keep the default instance details
instancedetails
Below the storage details
storage
The instance tag
tag
We keep default values for the security group
securitygroup
After we have the instance review which is resuming our configuration
instancereview
Before launching the instance, we have to create a key pair. And we have to store the private one we will use to connect using putty for example.
keypair

 

We can finish the process now by clicking on Launch Instances
launch1

launch2
If we click on the Connect tab on the top we have info how to connect. One useful info is the Public DNS we will use to connect.
connect
Now that our instance is ready let’s see how to connect. I am using putty.
A few steps ago we have created a key pair  and we kept the private one with an extension .pem. Using this key we will create a key with a format for putty (.ppk). For this we will use puttygen.
Just launch putty key generator and load the .pem key and follow the instructions
puttygen1
puttygen2
puttygen3
puttygen4
puttygen5
And Now we can use putty and load the .ppk private key to connect with the user ec2-user which is a built-in user and using the Public DNS.
putty11
Click Browse to load the .ppk file
putty2

Using username "ec2-user".
Authenticating with public key "imported-openssh-key"
[ec2-user@ip-172-31-33-57 ~]$ hostname
ip-172-31-33-57.us-west-2.compute.internal
[ec2-user@ip-172-31-33-57 ~]$

[ec2-user@ip-172-31-33-57 ~]$ cat /proc/meminfo | grep Mem
MemTotal:        1014976 kB
MemFree:          630416 kB
MemAvailable:     761716 kB
[ec2-user@ip-172-31-33-57 ~]$

[ec2-user@ip-172-31-33-57 ~]$ cat /proc/cpuinfo | grep proc
processor       : 0
[ec2-user@ip-172-31-33-57 ~]$

[ec2-user@ip-172-31-33-57 ~]$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.3 (Maipo)
[ec2-user@ip-172-31-33-57 ~]$

 

 

 

Leave a Reply

Mouhamadou Diaw
Mouhamadou Diaw

Consultant