{"id":1145,"date":"2021-11-03T08:40:28","date_gmt":"2021-11-03T08:40:28","guid":{"rendered":"https:\/\/salarydistribution.com\/machine-learning\/2021\/11\/03\/get-started-with-rstudio-on-amazon-sagemaker\/"},"modified":"2021-11-03T08:40:28","modified_gmt":"2021-11-03T08:40:28","slug":"get-started-with-rstudio-on-amazon-sagemaker","status":"publish","type":"post","link":"https:\/\/salarydistribution.com\/machine-learning\/2021\/11\/03\/get-started-with-rstudio-on-amazon-sagemaker\/","title":{"rendered":"Get started with RStudio on Amazon SageMaker"},"content":{"rendered":"<div id=\"\">\n<p>Today, we\u2019re excited to <a href=\"https:\/\/aws.amazon.com\/blogs\/aws\/announcing-fully-managed-rstudio-on-amazon-sagemaker-for-data-scientists\" target=\"_blank\" rel=\"noopener noreferrer\">announce RStudio on Amazon SageMaker<\/a>, the industry\u2019s first fully-managed RStudio integrated development environment (IDE) in the cloud. You can now bring the current RStudio licenses and migrate your self-managed RStudio environments to <a href=\"https:\/\/aws.amazon.com\/sagemaker\/\" target=\"_blank\" rel=\"noopener noreferrer\">Amazon SageMaker<\/a> in a few simple steps.<\/p>\n<p><a href=\"https:\/\/www.rstudio.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">RStudio<\/a> is one of the most popular IDEs among R developers for data science, statistical analysis, and machine learning (ML). However, building, securing, scaling, and maintaining RStudio yourself can be tedious and cumbersome. RStudio on SageMaker offers a quick and easy way to migrate your self-managed RStudio environments to the cloud. You can bring your current RStudio licenses to SageMaker through <a href=\"https:\/\/aws.amazon.com\/license-manager\/\" target=\"_blank\" rel=\"noopener noreferrer\">AWS License Manager<\/a>. You can fully secure your RStudio environment using several built-in SageMaker capabilities, such as applying fine-grained access controls via <a href=\"https:\/\/aws.amazon.com\/iam\/\" target=\"_blank\" rel=\"noopener noreferrer\">AWS Identity and Access Management<\/a> (IAM), restricting network traffic to your VPC, and automatically encrypting data at rest. You can also monitor logs through <a href=\"https:\/\/aws.amazon.com\/cloudwatch\/\" target=\"_blank\" rel=\"noopener noreferrer\">Amazon CloudWatch<\/a> and manage billings through <a href=\"https:\/\/aws.amazon.com\/aws-cost-management\/aws-billing\/\" target=\"_blank\" rel=\"noopener noreferrer\">AWS Billing<\/a>. Meanwhile, you can author R code in the familiar RStudio interface with fully elastic compute that can be dialed up and down without interrupting your work, thereby accelerating model development and improving productivity.<a href=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2021\/10\/25\/ML-5807-image001.jpg\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-29821\" src=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2021\/10\/25\/ML-5807-image001.jpg\" alt=\"\" width=\"3636\" height=\"2260\"><\/a><\/p>\n<p>SageMaker already comes with <a href=\"https:\/\/docs.aws.amazon.com\/sagemaker\/latest\/dg\/studio.html\" target=\"_blank\" rel=\"noopener noreferrer\">Amazon SageMaker Studio<\/a> notebooks for building and deploying ML models. With RStudio on SageMaker, you can unify your Python and R data science teams in one single place, enabling closer collaboration and centralized administration of your data science organization. Moreover, developers proficient with both R and Python can freely switch between RStudio and Studio notebooks. All of your work, including code, datasets, repositories, and other artifacts, are synchronized between the two environments through the common underlying <a href=\"https:\/\/aws.amazon.com\/efs\/\" target=\"_blank\" rel=\"noopener noreferrer\">Amazon Elastic File System<\/a> (Amazon EFS) storage.<\/p>\n<p>In this post, we show you how to bring your RStudio Workbench licenses into License Manager, how to set up RStudio on SageMaker, and how to administer RStudio on SageMaker.<\/p>\n<h2>Prerequisites<\/h2>\n<p>RStudio on SageMaker requires an IAM execution role that has permissions to License Manager and CloudWatch. The actions needed are listed in the following code. For more information, see <a href=\"https:\/\/docs.aws.amazon.com\/sagemaker\/latest\/dg\/rstudio-create-cli.html#rstudio-create-cli-domainexecution\" target=\"_blank\" rel=\"noopener noreferrer\">Create DomainExecution Role<\/a>.<\/p>\n<div class=\"hide-language\">\n<pre><code class=\"lang-bash\">{\n    \"Version\": \"2012-10-17\",\n    \"Statement\": [\n        {\n            \"Sid\": \"VisualEditor0\",\n            \"Effect\": \"Allow\",\n            \"Action\": [\n                \"license-manager:ExtendLicenseConsumption\",\n                \"license-manager:ListReceivedLicenses\",\n                \"license-manager:GetLicense\",\n                \"license-manager:CheckoutLicense\",\n                \"license-manager:CheckInLicense\",\n                \"logs:CreateLogDelivery\",\n                \"logs:CreateLogGroup\",\n                \"logs:CreateLogStream\",\n                \"logs:DeleteLogDelivery\",\n                \"logs:Describe*\",\n                \"logs:GetLogDelivery\",\n                \"logs:GetLogEvents\",\n                \"logs:ListLogDeliveries\",\n                \"logs:PutLogEvents\",\n                \"logs:PutResourcePolicy\",\n                \"logs:UpdateLogDelivery\"\n            ],\n            \"Resource\": \"*\"\n        }\n    ]\n}    <\/code><\/pre>\n<\/p><\/div>\n<p>We prepared an <a href=\"https:\/\/aws.amazon.com\/cloudformation\/\" target=\"_blank\" rel=\"noopener noreferrer\">AWS CloudFormation<\/a> <a href=\"https:\/\/s3.amazonaws.com\/sagemaker-sample-files\/templates\/rstudio-domain-execution-role.yml\" target=\"_blank\" rel=\"noopener noreferrer\">stack<\/a> that creates the required IAM execution role in your account.<\/p>\n<ol>\n<li>Choose <strong>Launch Stack<\/strong>.<br \/><a href=\"https:\/\/console.aws.amazon.com\/cloudformation\/home?region=us-east-1#\/stacks\/new?templateURL=https:\/\/s3.amazonaws.com\/sagemaker-sample-files\/templates\/rstudio-domain-execution-role.yml\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-15948 size-full\" src=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2020\/09\/16\/2-LaunchStack.jpg\" alt=\"\" width=\"107\" height=\"20\"><\/a><\/li>\n<\/ol>\n<p>The link takes you to the <code>us-east-1<\/code> Region, but you can change to your preferred Region. IAM roles are global resources, so you can access the role in any Region.<\/p>\n<ol start=\"2\">\n<li>In the <strong>Specify template <\/strong>section, choose <strong>Next<\/strong>.<\/li>\n<li>In the <strong>Specify stack details <\/strong>section, for <strong>Stack name<\/strong>, enter a name and choose <strong>Next<\/strong>.<\/li>\n<li>In the <strong>Configure stack options <\/strong>section, choose <strong>Next<\/strong>.<\/li>\n<li>In the <strong>Review <\/strong>section, select <strong>I acknowledge that AWS CloudFormation might create IAM resources<\/strong> and choose <strong>Next<\/strong>.<\/li>\n<li>When the stack status changes to <code>CREATE_COMPLETE<\/code>, go to the <strong>Resources<\/strong> tab to find the IAM role created.<\/li>\n<\/ol>\n<p>RStudio on SageMaker can only be configured by creating a new SageMaker domain. You need to use an AWS account and Region that doesn\u2019t have an existing SageMaker domain.<\/p>\n<h2>Bring your RStudio license to License Manager<\/h2>\n<p><a href=\"https:\/\/www.rstudio.com\/products\/workbench\/\" target=\"_blank\" rel=\"noopener noreferrer\">RStudio Workbench<\/a> is a paid product and requires that each user is appropriately licensed. SageMaker is not a reseller of RStudio Workbench licenses. RStudio on SageMaker requires a product license from RStudio. For customers of RStudio Workbench Enterprise, licenses are issued at no additional cost. To use RStudio on SageMaker, you need to bring your RStudio license to License Manager by completing the following steps:<\/p>\n<ol>\n<li>If you don\u2019t have an RStudio Workbench license, you can purchase one on <a href=\"https:\/\/www.rstudio.com\/pricing\/%22%20%5Cl%20%22rstudio\" target=\"_blank\" rel=\"noopener noreferrer\">RStudio Pricing<\/a> or by contacting RStudio Sales (<a href=\"mailto:sales@rstudio.com\" target=\"_blank\" rel=\"noopener noreferrer\">sales@rstudio.com<\/a>).<\/li>\n<li>To add RStudio on SageMaker to your existing RStudio Workbench Enterprise purchase, or to convert an RStudio Workbench Standard license to SageMaker, contact your RStudio Sales Representative (or <a href=\"mailto:sales@rstudio.com\" target=\"_blank\" rel=\"noopener noreferrer\">sales@rstudio.com<\/a>), who will send you the appropriate electronic order form.<\/li>\n<\/ol>\n<p>RStudio grants your RStudio Workbench licenses to your AWS accounts through License Manager in the US East (N. Virginia) Region. You can expect the license grant process to complete within 3 business days after you share the AWS account IDs with RStudio.<\/p>\n<ol start=\"3\">\n<li>After the license is granted, you receive notification from RStudio with instructions to log in to the License Manager console <a href=\"https:\/\/console.aws.amazon.com\/license-manager\/home?region=us-east-1#\/grantedLicenses\" target=\"_blank\" rel=\"noopener noreferrer\">Granted licenses page<\/a> in the US East (N. Virginia) Region to accept the license grant.<\/li>\n<li>If this is your first time using License Manager, choose <strong>Create customer managed license<\/strong>.<br \/><a href=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2021\/10\/25\/ML-5807-image005.jpg\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-29822\" src=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2021\/10\/25\/ML-5807-image005.jpg\" alt=\"\" width=\"1149\" height=\"498\"><\/a><\/li>\n<li>Select <strong>I grant AWS License Manager the required permissions<\/strong>, and choose <strong>Grant permissions<\/strong>.<br \/><a href=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2021\/10\/25\/ML-5807-image007.jpg\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-29823\" src=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2021\/10\/25\/ML-5807-image007.jpg\" alt=\"\" width=\"1149\" height=\"498\"><\/a><\/li>\n<li>On the <a href=\"https:\/\/console.aws.amazon.com\/license-manager\/home?region=us-east-1%22%20%5Cl%20%22\/grantedLicenses\" target=\"_blank\" rel=\"noopener noreferrer\">Granted licenses page<\/a>, select the license grant with <code>RSW-SageMaker<\/code> as the product name and choose <strong>View<\/strong>.<br \/><a href=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2021\/10\/25\/ML-5807-image009.jpg\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-29824\" src=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2021\/10\/25\/ML-5807-image009.jpg\" alt=\"\" width=\"1537\" height=\"452\"><\/a><\/li>\n<li>On the license detail page, choose <strong>Accept &amp; activate license<\/strong>.<br \/><a href=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2021\/10\/25\/ML-5807-image011.jpg\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-29825\" src=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2021\/10\/25\/ML-5807-image011.jpg\" alt=\"\" width=\"1492\" height=\"537\"><\/a><\/li>\n<\/ol>\n<p>Now you have accepted your RStudio Workbench license into AWS. We\u2019re ready to create RStudio on SageMaker. Although the license grant occurs in the US East (N. Virginia) Region, your license can be consumed by RStudio on SageMaker in any Region that supports the feature.<\/p>\n<h2>Create a SageMaker domain with RStudio<\/h2>\n<p>You can configure RStudio on SageMaker as part of a multi-step SageMaker domain creation process on the <a href=\"http:\/\/aws.amazon.com\/console\" target=\"_blank\" rel=\"noopener noreferrer\">AWS Management Console<\/a>. You can also perform the steps using the <a href=\"https:\/\/aws.amazon.com\/cli\/\" target=\"_blank\" rel=\"noopener noreferrer\">AWS Command Line Interface<\/a> (AWS CLI) following instructions on <a href=\"https:\/\/docs.aws.amazon.com\/sagemaker\/latest\/dg\/rstudio-create-cli.html\" target=\"_blank\" rel=\"noopener noreferrer\">Create an Amazon SageMaker Domain with RStudio using the AWS CLI<\/a> page. To create your domain on the console, complete the following steps:<\/p>\n<ol>\n<li>On the SageMaker console, on the <strong>SageMaker Domain <\/strong>page, choose <strong>Standard setup<\/strong>, and choose <strong>Configure<\/strong>.<br \/><a href=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2021\/10\/25\/ML-5807-image013.jpg\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-29826\" src=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2021\/10\/25\/ML-5807-image013.jpg\" alt=\"\" width=\"1303\" height=\"525\"><\/a><\/li>\n<li>For <strong>Authentication method<\/strong>, choose either <strong>AWS SSO<\/strong> or <strong>AWS IAM<\/strong>.<\/li>\n<\/ol>\n<p>In this post, we choose <strong>AWS IAM<\/strong>. To use <a href=\"https:\/\/aws.amazon.com\/single-sign-on\/\" target=\"_blank\" rel=\"noopener noreferrer\">AWS Single Sign-On<\/a> (AWS SSO), follow the steps in <a href=\"https:\/\/docs.aws.amazon.com\/sagemaker\/latest\/dg\/onboard-sso-setup.html\" target=\"_blank\" rel=\"noopener noreferrer\">Set Up AWS SSO for Use with Amazon SageMaker Studio<\/a>.<\/p>\n<ol start=\"3\">\n<li>Under <strong>Permission<\/strong>, choose or create a default IAM execution role for your SageMaker domain.<\/li>\n<\/ol>\n<p>RStudio requires a separate IAM execution role to access License Manager and publish logs to CloudWatch.<\/p>\n<ol start=\"4\">\n<li>Select your preferred <strong>Network and Storage<\/strong> options.<\/li>\n<\/ol>\n<p>The network and encryption settings are effective to both RStudio and Studio.<\/p>\n<ol start=\"5\">\n<li>Choose <strong>Next<\/strong>.<\/li>\n<li>In <strong>Step 2: Studio settings<\/strong>, you can configure notebook sharing, SageMaker projects, and <a href=\"https:\/\/docs.aws.amazon.com\/sagemaker\/latest\/dg\/studio-jumpstart.html\" target=\"_blank\" rel=\"noopener noreferrer\">Amazon SageMaker JumpStart<\/a> for your Studio notebooks.<\/li>\n<li>In <strong>Step 3: RStudio settings<\/strong>, you can configure the RStudio Workbench license, server instances, permission, RStudio Connect, and RStudio Package Manager.<\/li>\n<\/ol>\n<p>Studio automatically detects a RStudio Workbench license after it\u2019s added and accepted in License Manager. For example, in the following screenshot, three RStudio Workbench seats are detected and added.<br \/><a href=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2021\/10\/25\/ML-5807-image015.jpg\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-29827\" src=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2021\/10\/25\/ML-5807-image015.jpg\" alt=\"\" width=\"1412\" height=\"736\"><\/a><\/p>\n<p>You can choose the instance type for the RStudio server that is going to be shared by all users. ml.t3.medium is free to use. For more information about how to choose an instance type, see <a href=\"https:\/\/docs.aws.amazon.com\/sagemaker\/latest\/dg\/rstudio-select-instance.html\" target=\"_blank\" rel=\"noopener noreferrer\">RStudioServerPro instance type<\/a> page. Note that this is not the instance where your data scientists run ML. Later, when we create a user profile to use RStudio on SageMaker, a data scientist can create R sessions with more instance types to choose from.<\/p>\n<ol start=\"8\">\n<li>For <strong>Permission<\/strong>, select the role <code><span>&lt;cloudformation-stack-name&gt;<\/span>-RStudio-ExecutionRole-xxxxxx<\/code> we created previously.<\/li>\n<\/ol>\n<p>This role allows RStudio on SageMaker to access RStudio licenses in License Manager and publish logs to CloudWatch.<\/p>\n<ol start=\"9\">\n<li>Optionally, you can configure default RStudio Connect and RStudio Package Manager URLs for all user profiles if you have the two servers running.\n<ol type=\"a\">\n<li>For <strong>RStudio Connect<\/strong>, enter your RStudio Connect server URL.<\/li>\n<li>For <strong>RStudio Package Manager<\/strong>, enter a CRAN or Bioconductor repository.<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p>To host RStudio Connect and RStudio Package Manager in AWS, you can learn more in the post <a href=\"https:\/\/aws.amazon.com\/blogs\/machine-learning\/host-rstudio-connect-and-package-manager-for-ml-development-in-rstudio-on-amazon-sagemaker\/\" target=\"_blank\" rel=\"noopener noreferrer\">Host RStudio Connect and Package Manager for ML development in RStudio on Amazon SageMaker<\/a>.<\/p>\n<ol start=\"10\">\n<li>Choose <strong>Submit<\/strong> to create the domain.<br \/><a href=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2021\/10\/25\/ML-5807-image017.jpg\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-29828\" src=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2021\/10\/25\/ML-5807-image017.jpg\" alt=\"\" width=\"1076\" height=\"694\"><\/a><\/li>\n<\/ol>\n<p>The domain creation takes a couple of minutes. When it\u2019s complete, we can add users for data scientists to access RStudio on SageMaker.<\/p>\n<h2>Create a SageMaker domain user profile<\/h2>\n<p>Creating a user in a SageMaker domain allows access to both Studio and RStudio on SageMaker. You can configure both on the SageMaker console. If you prefer to use the AWS CLI to set up a user, see <a href=\"https:\/\/docs.aws.amazon.com\/sagemaker\/latest\/dg\/rstudio-create-user.html\" target=\"_blank\" rel=\"noopener noreferrer\">Manage users<\/a> page. To enable RStudio for a user via the console, complete the following steps:<\/p>\n<ol>\n<li>On the <strong>SageMaker Domain<\/strong> page, choose <strong>Add user<\/strong>.<br \/><a href=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2021\/10\/25\/ML-5807-image019.jpg\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-29829\" src=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2021\/10\/25\/ML-5807-image019.jpg\" alt=\"\" width=\"1251\" height=\"309\"><\/a><\/li>\n<li>For <strong>Name<\/strong>, enter a user name.<\/li>\n<li>For <strong>Default execution role<\/strong>, choose an existing role or create a new one with specific access to <a href=\"http:\/\/aws.amazon.com\/s3\" target=\"_blank\" rel=\"noopener noreferrer\">Amazon Simple Storage Service<\/a> (Amazon S3) buckets.<\/li>\n<li>Choose <strong>Next<\/strong>.<br \/><a href=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2021\/10\/25\/ML-5807-image021.jpg\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-29830\" src=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2021\/10\/25\/ML-5807-image021.jpg\" alt=\"\" width=\"1430\" height=\"813\"><\/a><\/li>\n<li>In <strong>Step 2: Studio settings<\/strong>, you can configure the access to <a href=\"https:\/\/docs.aws.amazon.com\/sagemaker\/latest\/dg\/sagemaker-projects-whatis.html\" target=\"_blank\" rel=\"noopener noreferrer\">SageMaker project templates<\/a> and JumpStart. You can keep it default even though we don\u2019t use this feature in this post; you can always edit it later.<\/li>\n<li>Choose <strong>Next<\/strong> to proceed.<\/li>\n<\/ol>\n<p>In <strong>Step 3: RStudio settings<\/strong>, for <strong>License Authorization<\/strong>, Studio automatically detects and adds RStudio Workbench licenses to the domain for you to choose from:<\/p>\n<ul>\n<li>\n<ul>\n<li><strong>RStudio Admin <\/strong>\u2013 Has access to the RStudio IDE and RStudio administrative dashboard<\/li>\n<li><strong>RStudio User <\/strong>\u2013 Has access to the RStudio IDE<\/li>\n<li><strong>Unauthorized <\/strong>\u2013 Doesn\u2019t have access to the RStudio IDE<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>Note that all options grant access to Studio.<\/p>\n<ol start=\"7\">\n<li>Choose either <strong>RStudio Admin<\/strong> or <strong>RStudio User<\/strong> and choose <strong>Submit<\/strong> to proceed.<\/li>\n<\/ol>\n<p>The user profile creation takes less than a minute.<br \/><a href=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2021\/10\/25\/ML-5807-image023.jpg\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-29831 size-full\" src=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2021\/10\/25\/ML-5807-image023.jpg\" alt=\"\" width=\"1430\" height=\"813\"><\/a><\/p>\n<ol start=\"8\">\n<li>You can open RStudio on SageMaker from the <strong>Launch app<\/strong> drop-down menu in the user list and choose <strong>RStudio<\/strong>.<br \/><a href=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2021\/10\/25\/ML-5807-image025.jpg\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-29832\" src=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2021\/10\/25\/ML-5807-image025.jpg\" alt=\"\" width=\"1215\" height=\"437\"><\/a><\/li>\n<\/ol>\n<h2>Administer RStudio on Amazon SageMaker<\/h2>\n<p>As an administrator, you can administer and monitor the usage of your data scientists using RStudio on SageMaker via the SageMaker console, the RStudio administrative dashboard, and in CloudWatch.<\/p>\n<h3>SageMaker console<\/h3>\n<p>An administrator who has necessary IAM permission such as <a href=\"https:\/\/console.aws.amazon.com\/iam\/home#\/policies\/arn%3Aaws%3Aiam%3A%3Aaws%3Apolicy%2FAdministratorAccess\" target=\"_blank\" rel=\"noopener noreferrer\">AdministratorAccess<\/a> can use the SageMaker console to manage the domain for both Studio and RStudio on SageMaker, such as the networking, security, and encryption. An administrator can also create users and assign proper authorization levels. Furthermore, an administrator can delete the apps created by a user, edit a user\u2019s IAM execution role, and delete a user via the SageMaker console. <a href=\"https:\/\/docs.aws.amazon.com\/sagemaker\/latest\/dg\/studio-entity-status.html\" target=\"_blank\" rel=\"noopener noreferrer\">An app in a SageMaker domain<\/a> refers to an application that supports the reading and execution experience of the user\u2019s notebooks, terminals, and consoles. Specifically, for RStudio on SageMaker, each R session is an <code>RSessionGateway<\/code> app. To edit a user, complete the following steps:<\/p>\n<ol>\n<li>On the <strong>SageMaker Domain<\/strong> page, choose a user.<br \/><a href=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2021\/10\/25\/ML-5807-image027.jpg\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-29833\" src=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2021\/10\/25\/ML-5807-image027.jpg\" alt=\"\" width=\"1546\" height=\"470\"><\/a><\/li>\n<\/ol>\n<p>You can see a list of apps created by the user.<\/p>\n<ol start=\"2\">\n<li>Delete an app by choosing <strong>Delete app<\/strong>.<\/li>\n<\/ol>\n<p>When all apps are deleted and in the <code>deleted<\/code> state, the <strong>Edit<\/strong> button is available.<\/p>\n<ol start=\"3\">\n<li>Choose <strong>Edit<\/strong> to edit permissions and other configurations, or delete the user profile.<br \/><a href=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2021\/10\/25\/ML-5807-image029.jpg\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-29834\" src=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2021\/10\/25\/ML-5807-image029.jpg\" alt=\"\" width=\"1546\" height=\"880\"><\/a><\/li>\n<\/ol>\n<h3>RStudio administrative dashboard<\/h3>\n<p>An administrator with RStudio admin authorization level can access the RStudio administrative dashboard to monitor active sessions and compute resources consumed by users. You can access the dashboard after you assume the SageMaker user profile that has RStudio admin authorization and replace <code>workspaces<\/code> with <code>admin<\/code>, as described in <a href=\"https:\/\/docs.aws.amazon.com\/sagemaker\/latest\/dg\/rstudio-admin.html\" target=\"_blank\" rel=\"noopener noreferrer\">RStudio administrative dashboard page<\/a>.<a href=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2021\/10\/25\/ML-5807-image031.jpg\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-29835\" src=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2021\/10\/25\/ML-5807-image031.jpg\" alt=\"\" width=\"845\" height=\"310\"><\/a><\/p>\n<p>The following screenshot shows an example of the administrative dashboard.<br \/><a href=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2021\/10\/25\/ML-5807-image033.jpg\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-29836\" src=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2021\/10\/25\/ML-5807-image033.jpg\" alt=\"\" width=\"1390\" height=\"933\"><\/a><\/p>\n<h3>CloudWatch<\/h3>\n<p>RStudio on SageMaker publishes logs, as allowed by the RStudio execution role, from the head node and R sessions to CloudWatch. Administrators and developers who have sufficient IAM permission to view CloudWatch Logs can view the system logs, and filter and debug issues. For example, in the following screenshot, you can find logs for an RSession (1), the JupyterLab server (2) and the RStudio server (3) as three distinct log streams on the CloudWatch console.<a href=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2021\/10\/25\/ML-5807-image035.jpg\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-29837\" src=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2021\/10\/25\/ML-5807-image035.jpg\" alt=\"\" width=\"1535\" height=\"921\"><\/a><\/p>\n<h2>Conclusion<\/h2>\n<p>RStudio is one of the most popular IDEs for data scientists and ML developers who code in R language. Starting today, you can use RStudio on Amazon SageMaker and take advantage of the fully managed infrastructure, access control, networking, and security capabilities in SageMaker. In this post, we detailed the steps to onboard RStudio Workbench paid licenses to License Manager, create a SageMaker domain with RStudio, create users to use RStudio on SageMaker, and administer RStudio on SageMaker via the SageMaker console, RStudio administrative dashboard, and CloudWatch.<\/p>\n<p>You can read more about the data scientist experience in the post <a href=\"https:\/\/aws.amazon.com\/blogs\/aws\/announcing-fully-managed-rstudio-on-amazon-sagemaker-for-data-scientists\" target=\"_blank\" rel=\"noopener noreferrer\">Announcing Fully Managed RStudio on Amazon SageMaker for Data Scientists<\/a>. You can also learn how to <a href=\"https:\/\/aws.amazon.com\/blogs\/machine-learning\/host-rstudio-connect-and-package-manager-for-ml-development-in-rstudio-on-amazon-sagemaker\/\" target=\"_blank\" rel=\"noopener noreferrer\">Host RStudio Connect and Package Manager for ML development in RStudio on Amazon SageMaker<\/a> to enhance your team\u2019s experience working with RStudio on SageMaker.<\/p>\n<hr>\n<h2>About the Authors<\/h2>\n<p><strong><a href=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2021\/08\/18\/Michael-Hsieh.jpg\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-27322 alignleft\" src=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2021\/08\/18\/Michael-Hsieh.jpg\" alt=\"\" width=\"100\" height=\"111\"><\/a>Michael Hsieh<\/strong> is a Senior AI\/ML Specialist Solutions Architect. He works with customers to advance their ML journey with a combination of AWS Machine Learning offerings and his ML domain knowledge. As a Seattle transplant, he loves exploring the great mother nature the region has to offer, such as the hiking trails, scenery kayaking in the SLU, and the sunset at the Shilshole Bay.<\/p>\n<p><strong><a href=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2021\/08\/18\/Sam-Liu.jpg\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-27323 alignleft\" src=\"https:\/\/d2908q01vomqb2.cloudfront.net\/f1f836cb4ea6efb2a0b1b99f41ad8b103eff4b59\/2021\/08\/18\/Sam-Liu.jpg\" alt=\"\" width=\"100\" height=\"100\"><\/a>Sam Liu<\/strong>\u00a0is a Product Manager at Amazon Web Services (AWS) focusing on AI\/ML infrastructure and tooling. Beyond that, he has 10 years of experience building machine learning applications in various industries. In his spare time, he enjoys golf and international traveling.<\/p>\n<p>       <!-- '\"` -->\n      <\/div>\n","protected":false},"excerpt":{"rendered":"<p>https:\/\/aws.amazon.com\/blogs\/machine-learning\/get-started-with-rstudio-on-amazon-sagemaker\/<\/p>\n","protected":false},"author":0,"featured_media":1146,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/posts\/1145"}],"collection":[{"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/comments?post=1145"}],"version-history":[{"count":0,"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/posts\/1145\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/media\/1146"}],"wp:attachment":[{"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/media?parent=1145"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/categories?post=1145"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/salarydistribution.com\/machine-learning\/wp-json\/wp\/v2\/tags?post=1145"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}