Launching an Amazon EC2 Server – The easy and fast way – AWS!

Introduction


Friends!
This is a very quick tutorial on how to setup your first Amazon EC2 Linux instance without much hassles. Please note that this is a very INSECURE way but it is fine as long a you understand how is it insecure. For example, when inbound IP is 0.0.0.0 it allows all the IPv4 Addresses to access your instance from outside via the corresponding protocol.
Important Note : To create an AWS Account you have to provide your credit card or debit card details to Amazon but as long as you are using its free tier it won’t charge you at all. If I am not wrong it is for a year. But please check their policies before proceeding but I have some credit in my AWS account but have never been charged yet. So, nothing to worry. Just choose the right FREE TIER for your First or Trial usage of AWS EC2 Instance.

Steps!

It’s been assumed that you have an AWS Account ready for usage!

  1. Login to your AWS Account

Screen Shot 2015-04-11 at 2.28.37 PM

2. Choose EC2 as the option

Screen Shot 2015-04-11 at 12.37.16 PM

3. Create a Key Pair by Clicking on Key Pair in the left column

Screen Shot 2015-04-11 at 12.46.33 PM

4. You will see the following screen. Follow the steps accordingly

Screen Shot 2015-04-11 at 12.46.42 PM

Screen Shot 2015-04-11 at 12.46.56 PM

This will create a key and the private key will be added to your Downloads folder. It is a PEM or PPK format file. If you are using Mac OS you will get a txt file downloaded. For example FunnyName.pem.txt. In Windows OS you may get a PPK file which has to be converted to PEM using PuttyGen or something similar. you can google for more details.

5. Create an Instance with the following steps

Screen Shot 2015-04-11 at 12.37.38 PM Launch Instance

Screen Shot 2015-04-11 at 12.37.56 PM First Option – Amazon Linux

Screen Shot 2015-04-11 at 12.38.23 PM First Option and then, the Blue Tab

Screen Shot 2015-04-11 at 12.38.39 PMNothing and the Blue Tab

Screen Shot 2015-04-11 at 12.38.53 PMNothing and the Blue Tab

Screen Shot 2015-04-11 at 12.40.01 PMYou can add rules for traffic here

Screen Shot 2015-04-11 at 12.40.25 PMLaunch

Screen Shot 2015-04-11 at 1.07.12 PMSelect the Pair you created and Launch Instance

6. Login using the tutorial for Mac Users. There will be a slightly different login way for Windows users but not very tough if you google. All you gotta do is use Putty or WinSCP for access after generating your PEM key from PPK key.

Screen Shot 2015-04-11 at 1.18.32 PM

Advertisements

SSHing to AWS Linux Server from your mac

Today I struggled for 15 minutes before figuring out how to SSH to Linux Server from mac (Being my first time as a previous Putty user from Windows). Mac had some recent changes apparently regarding OpenSSH protocol implementation. ‘M not sure though. All you gotta do is follow the simple steps (if you don’t know a quicker way) in your mac terminal:

  • mv <your_pem_file> ~/.ssh 
  • chmod 600 ~/.ssh/<your_pem_file> - Limits access to file - Necessary
  • chmod 700 ~/.ssh - Limits access to folder - Necessary
  • ssh -i ~/.ssh/<your_pem_file> ec2-user@<AWS_Server_Domain_name>

You’ll get the following screen 🙂 Enjoy coding in AWS !!

Screen Shot 2015-03-31 at 2.43.18 AM