RStudio server on UBUNTU 14.04 #rstats

A quick guide to how to get a RStudio server on UBUNTU 14.04 running within a free tier of EC2 @ 

Step-1 - Login into your AWS Console , click on EC2 virtual server in the cloud [ top left corner] 

Step-2 - Click on LAUNCH INSTANCE , the Blue Action Button in the Middle of the page as seen below . 
On the Next Page Scroll down and search for and Choose -  the UBUNTU AMI - Ubuntu Server 14.04 LTS (HVM), SSD Volume Type - ami####

Step-3 -
Choose the Instance Type - in this case we have chosen the Free Tier 

Step -4 - Now we get to see an ALERT for reviewing our Instances Security and Security Group , we ignore this as of now . 
Now what i did wrong here and you should not is --- Under the Security Groups you need to add a HTTP access to access the R Studio and then Subsequent SHINY Apps from the Browser from any Public IP [ say your Clients IP ] . So to see that happening and the alternative i had to figure out later - scroll down to the end of this post ....but as of now i went ahead and launched. 

Step-5 - The system now prompts for a KEY PAIR , that forms the Instances Level 1 Security . As this could be the first time you are launching an instance on AWS you need a New Key pair . 

Step - 6 - Once the New Key Pair is created you download the same and save the *.pem file on your Local Hard Disk , you need to access the PATH to this file later as you shall need to generate a *.ppk file by using PuTTYGen , more on this soon ...

Step-7- Now we can see that the INSTANCE is Running , we also get to see [ in my case - yours shall be similar ] the Instance ID - i-d63ba558

Public IP - - which is linked to the Public DNS [ Domain Name Server ] , this is required to access the RStudio Server in a web Browser over the Internet - but that is If you have catered for HTTP access in the Security Settings above - which i had NOT :) 

As seen in pic below - we have an option to ADD RULES below the row that shows the default TYPE - SSH , Protocol - TCP --- this is where you ADD Protocol - HTTP 

Step- 8 - On your Local System - Windows machine you now need to Install PuTTY , this is resource which shall generate a *.ppk key and also enable the Firing or Triggering of the AWS Ubuntu Instance . 

Step - 9 - Save the New Key generated by PuTTY in the *.ppk format , my 2 bits - keep the key name same let PuTTY Gen change the extension n save in the same folder as earlier . 

At this stage you shall see another ALERT for a PASS PHRASE , this too can be ignored for Now . Do not ignore this alert and Set Up a pass Phrase if you want to have an additional Login for the users and self when Login into the RStudio Server or the Overall UBUNTU Instance.
Step -10 - Launch the PuTTY Configuration App and now be ready with the File Path of the Private Key converted to *.ppk earlier. 
As seen below the Host Name is supposed to be - "ubunutu" and then the "@" and the Public DNS - in my case its as seen below -

Now in the category Dialog box on the left scroll down to SSH and expand it to reveal - Auth and GSAPI .insert the Private Key in the File Path and Voila ...Not yet seen below , we get another Alert ...that there is no guarantee that the server is the computer you think it is :) 

Ignore this and click on YES 

Step- 11- You can now see your UBUNTU Instance is Launched , from here onwards this post is more about the RStudio Server and also the other easier option available for creating an RStudio Server Instance on AWS using an AMI created by - Louis Aslett

Also to be noted the best resource on the net that i could find - gives clear instructions to install R Studio n R Server on UBUNTU is from Digital Ocean 

This works just fine for the AWS Instance and thus was used here by me ....following instructions above R Base was installed.....

RStudio and SHINY also installed as seen below --- 

R Studio and Shiny Server Installed ----

 the sessionInfo() is as seen below - 

Step - 12 - Get the AMI from Louis Aslett and make life easier for yourself :) 
See his Video here and Follow instructions , by now i didn't need to see the video and had messed around enough to get mine going ....

Now  am Running Shiny Server on a AWS Ubuntu 14.04 . 

Using the Public DNS we can launch the same from any web- browser over the internet 

Also on initial launch from within R Studio - you shall be prompted for a password change - do the same and when you return to the Public DNS / Public IP in your browser - you can Login with the changed password .