Simple Tutorial on how to Use Ec2

Feb 02, 2018 by ohiodn8




To get started with AWS, visit aws.amazon.com and sign up for an account. If you already have an account, just sign in.

To know more about Ec2, visit the Ec2 doc page, but an easy explanation is that Ec2 let's you set up virtual servers. With these servers, you can host web applications and services. A good client of AWS is Netflix (I'm sure everyone knows Netflix).


Now that you're logged in, you should be served a page like the image below. Click the Ec2 link.

(If you can't find ec2 on the page, use the search bar to find it)



On your Ec2 dashboard, click the Launch Instance Button


We'll be using Ubuntu Server, click on that


I'll be using the t2.micro (free tier eligble), click Next


Nothing to do on this page... Amazon will use a default VPC that it created for you. If you have no knowledge of how AWS VPC works, please leave it as it is... click next to storage...


I'll leave  it as it is  and click Next



On the Add Tag Page, I'll click Add Tag and put in the value as the image below (the info added is by choice, you could leave it empty)



For the Configure Security Group, I'll create a new security group and give it an SSH rule (that should be the default setting). Click Next


Right Now You should be on a page that says review instance and launch, click launch.

A key Pair setting should pop up. If you know how key pairs work and have the .pem file on your local machine you can use that but for the sake of this tutorial, I'll create a new one. I'll call it remote and then I'll click the Download Key Pair button before I launch the instance. Once the instance is launched, scroll down and click View Instance


You should see...


(I have an Instance I just terminated, don't mind that.)


Time for PuTTY and SSH

For Windows we will need a tool called PuttyIf you don't already have it, search for it online and download. (if you're trying this tutorial from an Ubuntu or MAC machine you should use the terminal. On your Ec2 page, you should see the connect button. Click that, and you'll see the steps to connect. You can also get PuTTY on your Ubuntu machine.)

We'll use the PuttyGen to convert our .pem to .ppk and we'll PuTTY to ssh into the instance (I'll show images to guide you.)


Start your putty Gen and click Load button


import the key pair you saved from creating your instance to PuttyGen


Then click Save Private Key button. We'll be using the saved key (.ppk file ) to ssh into our AWS server. 

Close your PuttyGen.


Now open PuTTY and copy the public IP (IPv4) from your running instance page (on the browser) to the field that says Host Name(or IP address) on PuTTY...