03.02.2020
Posted by 

Because received a good interest, last month I override shinyapps.io. That got me move my Shiny App on an Amazon AWS instance. Well, it was not so straight forward: even if there is plenty of tutorials around the web, every one seems to miss a part: upgrading R version, removing shiny-server examples And even having all info it is still quite a long, error-prone process. All this pain is removed by ramazon, an R package that I developed to take care of everything is needed to deploy a shiny app on an AWS instance. An early disclaimer for Windows users: only Apple OS X is supported at the moment. Using ramazon As one would expect, using ramazon is a very pleasant experience, given that you just have to run a function, ramazon, passing to it the EC2 instance publicDNS and the name of the key pair file downloaded from amazon AWS.

Just follow the following steps to deploy your app with ramazon. Launch an amazon EC2 instance I am not going to go into details, I can see you are in a hurry to see your app on the Web, I will just show you screenshoots from the process. Be sure to change all parameters in accordance with the screenshots. Retrieve the public dns As shown within the above introduced deck, you can f ind your Publicdns among the instance details: Retrieve your keypair name your key pair name is associated with the security group you choose for the ec2 instance. Take note of it directly when creating the instance.

Install ramazon package a working version of ramazon package is. Hi Mark, first of all I really apologise for this late reply: I am just changing my job and those have been quite challenging days:). That said, I experienced the same problem while developing ramazon: it was basically due to not installing shiny library at an admin level. This should actually be solved within amazon workflow, since shiny package installation is provided in sudo mode. Nevertheless you can tackle this issue doing the following:. open a terminal session. access your amazon aws instance running: ssh StrictHostKeyChecking=no -v -i.keypairaddress.userserver.

where keypairaddress userserver are the same parameters you passed to ramazon function. run the following sudo su - -c 'R -e 'install.packages('shiny', repos='. start an r session R.

How to host your shiny app on amazon ec2 for mac mac

check for shiny package availability library(shiny) You can find more on the issue at the following link: I really hope this will help you and once again apologise for late reply. Really thank you for getting back after trying ramazon: it is a really recent package and any help for its developement is really appreciated. Good thing is that I have just released a new version of the ramazon package! Find out more here: Ramazon is now able to detect and install all packages required by your shiny app. Moreover handling for “one-file” shiny app is available. Anyway, let me ask you a few questions so that I can help you understand what is not working:.

are you working on a OS X operating system?. did you installed latest ramazon version?

To be sure just run: detach(ramazon) installgithub('andreacirilloac/ramazon') library(ramazon) Finally, could you just send me (andreacirilloac at gmail.com):. the bash script produced by ramazon ( find it within the shiny app folder).

How To Host Your Shiny App On Amazon Ec2 For Mac Download

Ec2

latest 10 lines of the Rstudio Console output after running ramazon function This should be enough to understand what’s going on, and should take you less time that deploying your app manually through the command line 🙂 Thank you again, A. Hi johan, Thank you for reporting this.

Two questions: 1) does your shiny app read any external file? This kind of error message is usually related to R being unable to read some csv or similar external source. 2) does your shiny app rely on packages different from shiny? The current version of Ramazon installs on the server only this package. I’m almost done with a new release where all required packaged are automatically detected and installed. You can find it on GitHub, develop branch. Thank you again and let me know 😀.

$scp -i /Desktop/amazon.pem /Desktop/MS115.fa ubuntu@ec2-54-166-128-20.compute-1.amazonaws.com:/data/ This command will upload a file - MS115.fa in your /Desktop/ folder of your laptop to folder /data/ on an Amazon instance. Note you still need to use the private key you used to connect to the Amazon instance with ssh. (In this example, it is the amazon.pem file in /Desktop/. Note: You need to make sure that the user “ubuntu” has the permission to write in the target directory. In this example, if /data/ was created by user “ubuntu”, it should be fine. Similarly, to download a file from Amazon instance to your laptop. Using FileZilla to transfer data If you want a more user-friendly tool to transfer data, FileZilla is a good choice.

How-to-host-your-shiny-app-on-amazon-ec2-for-mac-os

How-to-host-your-shiny-app-on-amazon-ec2-for-mac-os X

It is free, it supports Windows/Linux/Mac systems, and it has a good user interface. It supports FTP, SFTP and other file transfer protocols. Firstly, go to ‘‘ and click “Download FileZilla Client” button to download it. The interface of FileZilla is like this: If you want to use FileZila to upload to or download data from a normal FTP server if you have the user and password, just put the information in the “Host”, “Username”, “Password” box and connect. However for Amazon instance, we use key-pair to log in instead of password for better safety. So it is a little bit more complicated to configure.

Open “Settings” and click “SFTP”: Click “Add keyfile.”: Then select the ”.pem” file you used to connect to Amazon instance with ssh. There is a dialog box to ask you if you want to convert the ”.pem” file into a supported format. Name it with extension as ”.ppk” and save it. You will see the a private key has been added. Close “Settings” and go back to the main interface.

Click button to open the site manager. Click “New Site”. Put the Amazon instance URL like ec2-54-166-128-20.compute-1.amazonaws.com in the “Host” box. Set “Protocol” as “SFTP”, “Logon Type” as “Normal”, “User” as “ubuntu” and leave “Password” as blank.

Then click “Connect”. There will be a dialogue box to ask you about “Unknown host key”, just click “Ok”. Now you have logged in the Amazon instance.

How To Host Your Shiny App On Amazon Ec2 For Mac Free

You can drag and drop to transfer the files between the remote machine and your local laptop. LICENSE: This documentation and all textual/graphic site content is licensed under the -. Presentations (PPT/PDF) and PDFs are the property of their respective owners and are under the terms indicated within the presentation.