

Two handy references can be found on Posit’s website for Rstudio server and on CRAN’s website for Ubuntu packages for R. Once the instance is launched we head over to our SSH terminal, log in, and install what is needed. Luckily if you forget to do any of these, the instance can be terminated and it is simple to start over. Launching a new instance with Ubuntu 22.04 is a few clicks in which two things are important for later steps: a security group that will allow SSH traffic and HTTP traffic, and a key to log into the instance. Step 1: Launch a new instance with Ubuntu 22.04 and install all R related packages Then I ran into some issues about keys being outdated and repositories not being enabled, and I decided I rather start from scratch instead of debugging the AMI. Unfortunately, the package I am developing uses the |> instead of the %>% pipe, and I had to make updates to make it work. I think this is perfectly fine for a lot of use cases. Louis Aslett has built a Rstudio server AMI, but as far as I can tell it is a bit outdated running on Ubuntu 18.04 and R 4.0.2. Can you go with a ready-made AMI?Īmazon Machine Images are the templates used to launch EC2 instances (the machine in the cloud we will be using).

I will assume that there is no need to explain how to open an account on AWS, or to explain how to navigate the AWS console. So I decided to use Rstudio serve on a EC2 instance for some of the more demanding tasks, and this post is mostly to keep track of the steps I did, and have a handy reference in the future. I keep seeing the memory usage indicator in Rstudio going red as soon as something more demanding is ran. Recently I had to test some computation in an R package I am developing and my computer froze multiple times. I use a Thinkpad from 2015 for my day to day work, and you can imagine things are getting slower as time goes by.
