I am glad you sorted out the issue!
As for the R 3.6 vs ubuntu 19.04 thing - having a current version of R in an AWS EC2 environment is not only possible, but highly recommended.
It will require some tweaking of your /etc/apt/sources.list file, possibly via sudo nano /etc/apt/sources.list command (I prefer nano to vim, as I know how to exit nano in a hurry, but that is a personal choice - both are available on AWS Linux).
You will need to add the appropriate line for your installation (I believe fresh EC2 instances start with bionic, but I am not 100% certain and don't have time to check) and then run sudo apt-get update && sudo apt-get install r-base. It is not absolutely required, but highly recommended, to install r-base-dev also.
Installing via the package manager has the nice side benefit that you get minor version upgrades automatically.
You will find the process described in a copy-paste friendly way on CRAN pages; you will find some troubleshooting tips there as well:
https://cran.r-project.org/bin/linux/ubuntu/README.html