Skip to main content

Triage and Remediation

Remediation

Using Console

Below are the console steps to disable root access for an existing (or new) SageMaker notebook instance.

A. Check current root access setting

  1. Sign in to the AWS Management Console.
  2. Open the Amazon SageMaker console.
  3. In the left menu, choose Notebook instances.
  4. Find your notebook instance and look at the Root access column:
    • It will show Enabled or Disabled.
If it’s already Disabled, no further change is needed.

B. Disable root access for an existing notebook instance

  1. In the Notebook instances list, select the notebook you want to change.
  2. Make sure the notebook is Stopped:
    • If it is InService, choose Stop and wait until the status becomes Stopped.
  3. With the notebook instance selected, choose Edit (or Actions ➜ Edit depending on the UI).
  4. In the edit screen, locate the Root access setting.
  5. Change Root access to:
    • Disabled
  6. Review any other settings you do not want to change, then scroll down and choose Submit or Save changes.
  7. After the edit completes, select the notebook instance and choose Start to bring it back InService.

C. Disable root access when creating a new notebook instance

  1. In the SageMaker console, go to Notebook instances.
  2. Choose Create notebook instance.
  3. Configure the required details (name, instance type, IAM role, VPC, etc.).
  4. Find the Root access setting.
  5. Set Root access to:
    • Disabled
  6. Complete the rest of the configuration as required and choose Create notebook instance.
The notebook instance will now come up with root access disabled.
To disable root access on a SageMaker Notebook Instance using AWS CLI, you must set the --root-access parameter to Disabled (either when creating the instance or by updating an existing one).Below are step‑by‑step instructions for both scenarios.

1. For a new Notebook Instance

When creating a notebook instance, specify --root-access Disabled:
Wait for the instance to be InService (you can check with):

2. For an existing Notebook Instance

You must update the configuration and then restart the instance.

Step 2.1 – Stop the notebook instance (if running)

(Optional) Wait until it is stopped:
Ensure the status is Stopped.

Step 2.2 – Update to disable root access

Step 2.3 – Start the notebook instance again


3. Verify root access is disabled

Expected output:
You disable root access on a SageMaker notebook instance by updating its configuration via the SageMaker API (boto3). Below are the minimal steps in Python.

1. Prerequisites

  • AWS credentials/config set (via environment variables, IAM role, or config files).
  • boto3 installed:

2. Disable root access on an existing Notebook Instance


3. Create a new Notebook Instance with root access disabled

This will create/run the notebook instance with root access disabled from the start.
The notebook instance must be in a Stopped state before Terraform can successfully apply the root_access = "Disabled" update; stopping/starting must be done outside Terraform (CLI or console) as Terraform does not expose those actions.This change does not force resource replacement; Terraform will perform an in-place update.
On terraform plan, you should see root_access changing from Enabled (or its current value) to "Disabled" for this aws_sagemaker_notebook_instance resource.