Step 2: Click the EC2 icon - Virtual Servers in the Cloud
Step 3: Launch an Instance
Click "Launch Instance" and choose an Amazon Machine Image. This example demonstrates how to set up an Amazon Linux AMI
Choose an Instance type: Amazon offers 1 free year at the t2.micro level
Configure Instance Details: Select advanced details and add the following information
#!/bin/bash#install Ryuminstall-yR#install RStudio-Serverwgethttps://download2.rstudio.org/rstudio-server-rhel-0.99.465-x86_64.rpmyuminstall-y--nogpgcheckrstudio-server-rhel-0.99.465-x86_64.rpm#install shiny and shiny-serverR-e"install.packages('shiny', repos='http://cran.rstudio.com/')"wgethttps://download3.rstudio.org/centos5.9/x86_64/shiny-server-1.4.0.718-rh5-x86_64.rpmyuminstall-y--nogpgcheckshiny-server-1.4.0.718-rh5-x86_64.rpm#add user(s)useraddusernameechousername:password|chpasswd
NOTE: Change username and password based on your requirements.
Add Storage: For normal setup, this step can be skipped
Tag Instance: Give your Instance a name
Congifure Security Group and add the following rules
Note that port 8787 is what allows the connection to RStudio Server. Additionally, if you wish to open your server up to other IP addresses, you will have to alter the settings.
Launch the Instance:
If you do not already have a private key pair, you will have to download one to your local machine. Keep this in a private location on your computer.
Step 4: Open RStudio Server
On the AWS Console, find the public DNS of your running instance. Copy and paste it into a browser followed by :8787
Example: http://ec2-52-91-255-28.compute-1.amazonaws.com:8787
</ul>
</ul>
NOTE:
Even if the instance appears to be showing with the green dot under the instance state, you will still have to wait for the status check to complete before being able to login to your RStudio session. </b> REMEMBER TO STOP OR TERMINATE YOUR INSTANCE