Triage and Remediation
Using Console
Using Console
-
Log in to the AWS Management Console:
- Open the AWS Management Console and navigate to the SageMaker service.
-
Identify Notebook Instances with Root Access Enabled:
- Go to the “Notebook instances” section.
- Check each notebook instance for the “Root access” setting. Instances with root access enabled will have it specified in their details.
-
Disable Root Access:
- Select the notebook instance you want to modify.
- Click “Edit.”
- In the “Notebook instance settings,” find the “Root access” setting and change it to “Disabled.”
- Save the changes and restart the notebook instance for the changes to take effect.
Using CLI
Using CLI
To disable root access for a SageMaker notebook instance using the AWS CLI, you need to update the
RootAccess
parameter.Identify and Update Notebook Instances:Using Python
Using Python
To disable root access for SageMaker notebook instances using a Python script, you’ll need the This script will list all notebook instances, describe each one to check its root access setting, and then disable root access for those with it enabled. Finally, it will restart the modified instances to apply the changes.Replace placeholders (
boto3
library:- Install
boto3
(if not already installed):
- Script to Identify and Update Notebook Instances:
<YourNotebookInstanceName>
) with appropriate values.