So I was able to install and activate the rstudio-server but I'm not sure how to launch the server so I can start writing and running script through a local host as described in https://indicatrix.org/post/running-rstudio-server-on-amazon-ec2/ with the following code, which does not work for me:
ssh -N -L localhost:8787:localhost:8787 -i ~/.ssh/aws2.pem ubuntu@<aws-ip>
-bash: syntax error near unexpected token `newline'
systemctl status rstudio-server.service
● rstudio-server.service - RStudio Server
Loaded: loaded (/etc/systemd/system/rstudio-server.service; enabled; vendor preset: disabled)
Active: active (running) since Wed 2020-10-07 17:27:17 UTC; 31min ago
Process: 17108 ExecStart=/usr/lib/rstudio-server/bin/rserver (code=exited, status=0/SUCCESS)
Main PID: 17109 (rserver)
CGroup: /system.slice/rstudio-server.service
└─17109 /usr/lib/rstudio-server/bin/rserver
any help would be great.