It documents the use of RStudio installed on AWS (Amazon Web Services) during the final project period. It is comprised of
The final project uses RStudio installed on AWS. Below is a screen of the RStudio instance on a web browser.
knitr::include_graphics("Screenshot_RStudio_AWS.png")
The R markdown file results in the document shown in the following.
knitr::include_graphics("Screenshot_RMarkdown_AWS.png")
It shows how to install Linux, R, RStudio, and Spark on AWS. If you want just RStudio, you can skip to “RStudio on Amazon EC2”.
Open the below website and follow the online instructions.
AWS provides usage information. Below is an example. It shows that the Free Tier usage limit is 750 hours per month for Amazon cloud computing and it used 72.8%, 546 hours.
knitr::include_graphics("AWSUsageInformation.png")
Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/
On the lest sidebar, scroll down and choose Key Pairs
Choose Create key pair
Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/
From the console dashboard, scroll down and choose Launch Instance
From the page displayed, click Select Amazon Linux 2 AMI …
Choose Review and Launch
Choose Launch
When prompted for a key pair, select Choose an existing key pair and the key pair you created, and then choose Launch Instances
Scroll down and choose View Instances.
Done.
On the Amazon EC2 console at https://console.aws.amazon.com/ec2/, choose Instances
Click the instance ID number under the Instant ID column
Choose Connect
Scroll down and choose Connect (You want to check the User name and IP address for connecting using PuTTY)
knitr::include_graphics("Screenshot_AWSLinux.jpg")
Open PuTTY on your computer
In Host Name, put User name @ IP address (See above)
Choose + in SSH and then choose Auth
Choose Browse for key file (See Creating an Amazon EC2 key pair)
Choose Session and then put a name in Saved Sessions and then press Save
Choose Open, then a terminal will open.
There are two ways of installing RStudio on AWS. The first one is simple:
On the following website https://www.louisaslett.com/RStudio_AMI/, choose an AMI nearby.
Follow the online instructions or refer to https://towardsdatascience.com/how-to-run-rstudio-on-aws-in-under-3-minutes-for-free-65f8d0b6ccda
R is available in Amazon Linux Extra topics “R3.4” and “R4”
To install R4, run
[ec2-user@ip-*--- ~]$ sudo amazon-linux-extras install R4
For RStudio, see https://jagg19.github.io/2019/08/aws-r/
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts.html AWS’s user guide for Linux instances
https://aws.amazon.com/amazon-linux-2/faqs/#Amazon_Linux_Extras Amazon Linux Extras library
https://github.com/amplab/spark-ec2 how to install spark-ec2
https://sparkour.urizone.net/recipes/installing-ec2/ installing AWS and Spark
https://jagg19.github.io/2019/08/aws-r/ An Up-to-date guide to running R on AWS EC2
https://towardsdatascience.com/how-to-run-rstudio-on-aws-in-under-3-minutes-for-free-65f8d0b6ccda 3-minutes to run RStudio on AWS