Create a user to use RStudio - Amazon SageMaker

Create a user to use RStudio

Important

Custom IAM policies that allow Amazon SageMaker Studio or Amazon SageMaker Studio Classic to create Amazon SageMaker resources must also grant permissions to add tags to those resources. The permission to add tags to resources is required because Studio and Studio Classic automatically tag any resources they create. If an IAM policy allows Studio and Studio Classic to create resources but does not allow tagging, "AccessDenied" errors can occur when trying to create resources. For more information, see Provide permissions for tagging SageMaker resources.

AWS Managed Policies for Amazon SageMaker that give permissions to create SageMaker resources already include permissions to add tags while creating those resources.

After your RStudio-enabled Amazon SageMaker domain is running, you can add user profiles (UserProfiles) to the domain. The following topics show how to create user profiles that are authorized to use RStudio, as well as update an existing user profile. For information on how to delete an RStudio App, UserProfile, or domain, follow the steps inĀ Delete an Amazon SageMaker domain.

Note

The limit for the total number of UserProfiles in a Amazon SageMaker domain is 60.

There are two types of users:

  • Unauthorized: This user cannot access the RStudio app. By default, a new user is Unauthorized if the domain is enabled for RStudio.

  • Authorized: This user can access the RStudio app and use one of the RStudio license seats.

If a user is authorized, they can be given one of the following levels of access to RStudio.

  • RStudio User: This is a standard RStudio user and can access RStudio.

  • RStudio Admin: The admin of your Amazon SageMaker domain has the ability to create users, add existing users, and update the permissions of existing users. Admins can also access the RStudio Administrative dashboard. However, this admin is not able to update parameters that are managed by Amazon SageMaker.

Methods to create a user

The following topics show how to create a user in your RStudio-enabled Amazon SageMaker domain.

Create user console

To create a user in your RStudio-enabled Amazon SageMaker domain from the console, complete the steps in Add user profiles.

Create user CLI

The following command shows how to add users to a Amazon SageMaker domain with IAM authentication. A User can belong to either the R_STUDIO_USER or R_STUDIO_ADMIN User group.

aws sagemaker create-user-profile --region <REGION> \ --domain-id <DOMAIN-ID> \ --user-profile-name <USER_PROFILE_NAME-ID> \ --user-settings RStudioServerProAppSettings={UserGroup=<USER-GROUP>}

The following command shows how to add users to a Amazon SageMaker domain with authentication using IAM Identity Center. A user can belong to either the R_STUDIO_USER or R_STUDIO_ADMIN User group.

aws sagemaker create-user-profile --region <REGION> \ --domain-id <DOMAIN-ID> \ --user-profile-name <USER_PROFILE_NAME-ID> \ --user-settings RStudioServerProAppSettings={UserGroup=<USER-GROUP>} \ --single-sign-on-user-identifier UserName \ --single-sign-on-user-value <USER-NAME>