
RStudio on Amazon SageMaker
Working with analysis or a data set that exceeds the capabilities of your local workstation? One simple option for scaling up is RStudio on Amazon SageMaker. See how you can get started quickly. Link to learn more: https://docs.aws.amazon.com/sagemaker/latest/dg/rstudio.html
image: thumbnail.jpg
Transcript#
This transcript was generated automatically and may contain errors.
This video will walk through the process of setting up a SageMaker domain with access to RStudio Workbench. So the first thing we need to do is make sure that we have access to an RStudio license within the AWS License Manager. So navigate to that within the AWS console. There's two ways that you can have access to a license here. One is either by purchasing an RStudio Workbench license from the Amazon Marketplace. The other is by reaching out directly to RStudio and requesting a license to be granted into your account. In the case that a license has been granted, you would need to then accept that license. So that's something that needs to be done with the License Manager. In here, I can see that I have an RStudio Workbench SageMaker license that's available. This is one that's been granted. I also have one that came from the Marketplace available in this account as well. So as long as you have a license available for RStudio Workbench, either one that's been granted to you by RStudio or one that you've purchased through the Marketplace, you can then go through the setup process within SageMaker.
Setting up the SageMaker domain
After I've confirmed that I have a license that's ready to go in License Manager, I'll navigate to the SageMaker landing page. Here, I can just click on Get Started. And this will bring me to this place where I can configure my SageMaker domain. I'm going to go ahead and set that up. I'm going to choose Standard Setup here because I want to adjust a few things specifically related to the RStudio Workbench setup. Here, I can choose which authentication mechanism I want to use, set up a default execution role. There's one that can be created for you if you need to create an execution role in here.
One thing that's worth noting is in order for you to have access to the license that you have inside of AWS License Manager, you'll need to make sure that this particular execution role has License Manager permissions. There's some documentation and details about that in a blog post by Amazon. But essentially, you just need to make sure that this execution role has permission to read License Manager information so that it can pull the license that you have for RStudio. Next, we can choose a VPC, subnets, all the relevant different pieces of information that we might want to set up here. This is where we set up SageMaker Studio. I'm not going to dive too deeply into this. If you're using SageMaker Studio, you have some options here about how that's set up and configured. I'm just going to leave all the defaults in place.
Configuring RStudio settings
And then the third step here are the RStudio settings. So you'll see that it will automatically identify that you have a Workbench license detected. And so it will enable these options within your SageMaker domain. This first option here is what instance type I want to run for the persistent RStudio Workbench environment. A T3 medium is typically sufficient. This instance runs 24-7. But if you choose a T3 medium, which is the default, you don't pay for that instance. It's an instance that is just provided for you by Amazon as part of your SageMaker environment. Then I need to choose an execution role for my RStudio server. In this case, there's this RStudio execution role that I've previously created.
you don't pay for that instance. It's an instance that is just provided for you by Amazon as part of your SageMaker environment.
If I want to pre-configure RStudio Connect and RStudio Package Manager URLs, I can put those in here. These become the default publication endpoints and default package repository within Workbench once you've set that up. Once I've gone through all these options, I can hit Submit. And then my domain will be created. This takes a few minutes for the domain to get up and running.
Adding users to the domain
Once the domain is running, the next step that I need to go through is add individual users onto the domain, which you can see here in the Users panel. When I click on Add User, it'll bring up a menu. And one of the things that I can do when I add a user is determine what their status is as an RStudio Workbench user, whether they are unauthorized, a standard user, or an admin user. And if I add them as either a standard or admin user, it gives them access to access RStudio Workbench. Now that the domain is ready, we can go ahead and go through this add user process.
Come in here, choose some sort of name. I'll just choose my own name. Define an execution role. And then here, again, these are settings related specifically to SageMaker Studio, which you can adjust if you want to. And then finally, here's where I can choose how I set this user up for RStudio, specifically whether they're an unauthorized user, which prevents them from accessing RStudio, an RStudio user, which gives them standard access, and an RStudio admin, which will provide access to the admin dashboard within RStudio.
Launching RStudio
Once this user gets provisioned, I can use the drop-down menu over here on the right-hand side to launch either Studio, if I've given them access to that, or RStudio, as I've given this user access to. Again, it'll take a moment for the user profile to be created. Once that's done, I can select something like RStudio, and I'll get dropped into an RStudio session on SageMaker, and I'm ready to go. In this particular case, we added this user to the admin group. So, if I wanted to, I could come in and adjust the URL and add admin at the end of it to gain access to the admin dashboard for that user as well. Hopefully, this helps get an idea of what it takes to set up a SageMaker domain with access to RStudio. Thanks for watching.
