Skip to content

Enable RStudio on AWS SageMaker

These steps provide a quickstart for enabling an Amazon Web Services (AWS) SageMaker domain with the RStudio integrated development environment (IDE).

RStudio on SageMaker references

RStudio on SageMaker is the implementation of Posit Workbench within a SageMaker Domain in which RStudio IDE sessions are made available to SageMaker users.

You may see references to RStudio Workbench or RStudio Server Pro in AWS documentation. These are previous names for Posit Workbench, and are being phased out as product and company rebranding updates are made in AWS documentation.

Requirements#

Step 1: Create a SageMaker domain with RStudio#

First, configure RStudio on SageMaker as part of the SageMaker domain creation process on the AWS Management Console.

To create your domain on the console, complete the following steps:

  1. Navigate to the Amazon SageMaker console and then to the SageMaker Domain page.
  2. From the SageMaker Domain page:

    1. Select Standard setup.
    2. Click Configure. Example image of the AWS Setup SageMaker domain page with Quick setup and Standard setup options displayed. Standard setup option is highlighted and configure button located in the bottom-legt is also highlighted.

    The SageMaker Domain - Setup SageMaker Domain wizard displays Step 1: General settings.


Setup SageMaker Domain - Step 1: General Settings:

  1. For the Authentication method, based on the standard method for your AWS environment, select either:
    • AWS SSO
    • AWS IAM
  2. For the Permission configuration, choose or create a default IAM execution role for your SageMaker domain.
  3. Select your preferred Network and Storage options.
  4. Click Next.

Add RStudio to an existing domain

Additionally, you can add RStudio to an existing domain. The procedures to do this are available in the Add RStudio support to an existing Domain AWS documentation.


Setup SageMaker Domain - Step 2: Studio Settings

Studio Settings allow you to configure your Studio notebooks.

Note

These configuration options are outside of the scope of RStudio setup.

Click Next to continue.


Setup SageMaker Domain - Step 3: RStudio settings

  1. In the RStudio Workbench - optional section, configure the following:

    1. License:
      • SageMaker automatically detects a Workbench license after it has been added and accepted by License Manager.
    2. Instance type:
      • You can choose the instance type for the Workbench server that is shared by all users.

    This instance runs on the Workbench server but not on users' individual RStudio sessions. Each RStudio user in SageMaker is able to choose a different instance type to run their session on, which is covered in the User profile section below.

    Please review the RStudio Architecture on SageMaker diagram.

    For more information about Workbench instance types, please see the RStudioServerPro instance type documentation.

  2. In the Permission section, from the RStudio Server execution role drop-down menu, select the IAM Execution role that you created as part of the Requirements.

  3. Optionally, you can configure the default Connect and Package Manager URLs for all user profiles at the domain level. For detailed instructions, see the Configure RStudio on SageMaker to use Posit products documentation.

  4. Once you have input all of your configuration options, click Next.
  5. To create the domain, click Submit.

Step 2. Create a SageMaker domain user profile#

Creating a user in a SageMaker domain allows access to both Studio and RStudio on SageMaker.

To enable RStudio for a user via the console, complete the following steps:

  1. Navigate to the Amazon SageMaker console and then to the SageMaker Domain page.
  2. From the SageMaker Domain page, click Add user.

    The SageMaker Domain - Add user profile wizard displays Step 1: General settings.


Add user profile - Step 1: General Settings:

  1. From the Add user profile page, do the following:

    1. In the Name field, type a username.
    2. From the Default execution role drop-down menu, choose an existing role or create a new one with specific access to Amazon Simple Storage Server (AWS) buckets.

      Default execution role

      This role is used when the user launches RStudio sessions and defines AWS permissions available to that session, such as what EC2 instance types are available for sessions, and permissions available for accessing S3 buckets. See the SageMaker Roles section of the Amazon SageMaker Developer Guide.

    3. Click Next.


Add user profile - Step 2: Studio Settings

Studio Settings allow you to configure your Studio notebooks.

Note

These configuration options are outside of the scope of RStudio setup.

Click Next to continue.


Setup SageMaker Domain - Step 3: RStudio settings

  1. From the RStudio Workbench - optional section, configure the following:
    1. License: Studio automatically detects a Workbench license after it's been added and accepted by License Manager.
    2. From the License Authorization drop-down menu, select either:
      • RStudio Admin or
      • RStudio User
    3. Click Submit.

Additional information#

The Get started with RStudio on Amazon SageMaker documentation provides additional information about the Requirements and various ways to complete this setup.