

# Amazon SageMaker Studio Classic
<a name="studio"></a>

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

Amazon SageMaker Studio Classic is a web-based integrated development environment (IDE) for machine learning (ML). Studio Classic lets you build, train, debug, deploy, and monitor your ML models. Studio Classic includes all of the tools you need to take your models from data preparation to experimentation to production with increased productivity. In a single visual interface, you can do the following tasks:
+ Write and run code in Jupyter notebooks
+ Prepare data for machine learning
+ Build and train ML models
+ Deploy the models and monitor the performance of their predictions
+ Track and debug ML experiments
+ Collaborate with other users in real time

For information on the onboarding steps for Studio Classic, see [Amazon SageMaker AI domain overview](gs-studio-onboard.md).

For information about collaborating with other users in real time, see [Collaboration with shared spaces](domain-space.md).

For the AWS Regions supported by Studio Classic, see [Supported Regions and Quotas](regions-quotas.md).

## Amazon SageMaker Studio Classic maintenance phase plan
<a name="studio-deprecation"></a>

The following table gives information about the timeline for when Amazon SageMaker Studio Classic entered its extended maintenance phase.




| Date | Description | 
| --- | --- | 
|  12/31/2024  |  Starting December 31st, Studio Classic reaches end of maintenance. At this point, Studio Classic will no longer receive updates and security fixes. All new domains will be created with Amazon SageMaker Studio as the default.  | 
|  1/31/2025  |  Starting January 31st, users will no longer be able to create new JupyterLab 3 notebooks in Studio Classic. Users will also not be able to restart or update existing notebooks. Users will be able to access existing Studio Classic applications from Studio only to delete or stop existing notebooks.  | 

**Note**  
Your existing Studio Classic domain is not automatically migrated to Studio. For information about migrating, see [Migration from Amazon SageMaker Studio Classic](studio-updated-migrate.md).

**Topics**
+ [Amazon SageMaker Studio Classic maintenance phase plan](#studio-deprecation)
+ [Amazon SageMaker Studio Classic Features](#studio-features)
+ [Amazon SageMaker Studio Classic UI Overview](studio-ui.md)
+ [Launch Amazon SageMaker Studio Classic](studio-launch.md)
+ [JupyterLab Versioning in Amazon SageMaker Studio Classic](studio-jl.md)
+ [Use the Amazon SageMaker Studio Classic Launcher](studio-launcher.md)
+ [Use Amazon SageMaker Studio Classic Notebooks](notebooks.md)
+ [Customize Amazon SageMaker Studio Classic](studio-customize.md)
+ [Perform Common Tasks in Amazon SageMaker Studio Classic](studio-tasks.md)
+ [Amazon SageMaker Studio Classic Pricing](studio-pricing.md)
+ [Troubleshooting Amazon SageMaker Studio Classic](studio-troubleshooting.md)

## Amazon SageMaker Studio Classic Features
<a name="studio-features"></a>

Studio Classic includes the following features:
+ [SageMaker Autopilot](https://docs.aws.amazon.com/sagemaker/latest/dg/autopilot-automate-model-development.html)
+ [SageMaker Clarify](https://docs.aws.amazon.com/sagemaker/latest/dg/model-explainability.html)
+ [SageMaker Data Wrangler](https://docs.aws.amazon.com/sagemaker/latest/dg/data-wrangler.html)
+ [SageMaker Debugger](https://docs.aws.amazon.com/sagemaker/latest/dg/debugger-on-studio.html)
+ [SageMaker Experiments](https://docs.aws.amazon.com/sagemaker/latest/dg/experiments.html)
+ [SageMaker Feature Store](https://docs.aws.amazon.com/sagemaker/latest/dg/feature-store-use-with-studio.html)
+ [SageMaker JumpStart](https://docs.aws.amazon.com/sagemaker/latest/dg/studio-jumpstart.html)
+ [Amazon SageMaker Pipelines](https://docs.aws.amazon.com/sagemaker/latest/dg/pipelines-studio.html)
+ [SageMaker Model Registry](https://docs.aws.amazon.com/sagemaker/latest/dg/model-registry.html)
+ [SageMaker Projects](https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-projects.html)
+ [SageMaker Studio Classic Notebooks](https://docs.aws.amazon.com/sagemaker/latest/dg/notebooks.html)
+ [SageMaker Studio Universal Notebook](https://docs.aws.amazon.com/sagemaker/latest/dg/studio-notebooks-emr-cluster.html)

# Amazon SageMaker Studio Classic UI Overview
<a name="studio-ui"></a>

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

Amazon SageMaker Studio Classic extends the capabilities of JupyterLab with custom resources that can speed up your Machine Learning (ML) process by harnessing the power of AWS compute. Previous users of JupyterLab will notice the similarity of the user interface. The most prominent additions are detailed in the following sections. For an overview of the original JupyterLab interface, see [The JupyterLab Interface](https://jupyterlab.readthedocs.io/en/latest/user/interface.html). 

The following image shows the default view upon launching Amazon SageMaker Studio Classic. The *left navigation* panel displays all top-level categories of features, and a *[Amazon SageMaker Studio Classic home page](#studio-ui-home)* is open in the *main working area*. Come back to this central point of orientation by choosing the **Home** icon (![\[Black square icon representing a placeholder or empty image.\]](http://docs.aws.amazon.com/sagemaker/latest/dg/images/studio/icons/house.png)) at any time, then selecting the **Home** node in the navigation menu.

Try the **Getting started notebook** for an in-product hands-on guide on how to set up and get familiar with Amazon SageMaker Studio Classic features. On the **Quick actions** section of the Studio Classic Home page, choose **Open the Getting started notebook**.

![\[SageMaker Studio Classic home page.\]](http://docs.aws.amazon.com/sagemaker/latest/dg/images/studio/studio-home.png)


**Note**  
This chapter is based on Studio Classic's updated user interface (UI) available on version `v5.38.x` and above on JupyterLab3.  
To retrieve your version of Studio Classic UI, from the [Studio Classic Launcher](https://docs.aws.amazon.com/sagemaker/latest/dg/studio-launcher.html), open a System Terminal, then  
Run `conda activate studio`
Run `jupyter labextension list`
Search for the version displayed after `@amzn/sagemaker-ui version` in the output.
For information about updating Amazon SageMaker Studio Classic, see [Shut Down and Update Amazon SageMaker Studio Classic](studio-tasks-update-studio.md).

**Topics**
+ [Amazon SageMaker Studio Classic home page](#studio-ui-home)
+ [Amazon SageMaker Studio Classic layout](#studio-ui-layout)

## Amazon SageMaker Studio Classic home page
<a name="studio-ui-home"></a>

The Home page provides access to common tasks and workflows. In particular, it includes a list of **Quick actions** for common tasks such as **Open Launcher** to create notebooks and other resources and **Import & prepare data visually** to create a new flow in Data Wrangler.The **Home** page also offers tooltips on key controls in the UI.

The **Prebuilt and automated solutions** help you get started quickly with SageMaker AI's low-code solutions such as Amazon SageMaker JumpStart and Autopilot.

In **Workflows and tasks**, you can find a list of relevant tasks for each step of your ML workflow that takes you to the right tool for the job. For example, **Transform, analyse, and export data** takes you to Amazon SageMaker Data Wrangler and opens the workflow to create a new data flow, or **View all experiments** takes you to SageMaker Experiments and opens the experiments list view.

Upon Studio Classic launch, the **Home** page is open in the main working area. You can customize your SageMaker AI **Home** page by choosing the **Customize Layout** icon (![\[Black square icon representing a placeholder or empty image.\]](http://docs.aws.amazon.com/sagemaker/latest/dg/images/studio/icons/layout.png)) at the top right of the **Home** tab.

## Amazon SageMaker Studio Classic layout
<a name="studio-ui-layout"></a>

The Amazon SageMaker Studio Classic interface consists of a *menu bar* at the top, a collapsible *left sidebar* displaying a variety of icons such as the **Home** icon and the **File Browser**, a *status bar* at the bottom of the screen, and a *central area* divided horizontally into two panes. The left pane is a collapsible *navigation panel*. The right pane, or main working area, contains one or more tabs for resources such as launchers, notebooks, terminals, metrics, and graphs, and can be further divided.

**Report a bug** in Studio Classic or choose the notification icon (![\[Red circle icon with white exclamation mark, indicating an alert or warning.\]](http://docs.aws.amazon.com/sagemaker/latest/dg/images/icons/Notification.png)) to view notifications from Studio Classic, such as new Studio Classic versions and new SageMaker AI features, on the right corner of the menu bar. To update to a new version of Studio Classic, see [Shut Down and Update Amazon SageMaker Studio Classic and Apps](studio-tasks-update.md).

The following sections describe the Studio Classic main user interface areas.

### Left sidebar
<a name="studio-ui-nav-bar"></a>

The *left sidebar* includes the following icons. When hovering over an icon, a tooltip displays the icon name. A single click on an icon opens up the left navigation panel with the described functionality. A double click minimizes the left navigation panel.


| Icon | Description | 
| --- | --- | 
|  ![\[The Home icon.\]](http://docs.aws.amazon.com/sagemaker/latest/dg/images/studio/icons/house@2x.png)  | **Home** Choose the **Home** icon to open a top-level navigation menu in the *left navigation* panel. Using the **Home** navigation menu, you can discover and navigate to the right tools for each step of your ML workflow. The menu also provides shortcuts to quick-start solutions and learning resources such as documentation and guided tutorials. The menu categories group relevant features together. Choosing **Data**, for example, expands the relevant SageMaker AI capabilities for your data preparations tasks. From here, you can prepare your data with Data Wrangler, create and store ML features with Amazon SageMaker Feature Store, and manage Amazon EMR clusters for large-scale data processing. The categories are ordered following a typical ML workflow from preparing data, to building, training, and deploying ML models (data, pipelines, models, and deployments). When you choose a specific node (such as Data Wrangler), a corresponding page opens in the main working area. Choose **Home** in the navigation menu to open the [Amazon SageMaker Studio Classic home page](#studio-ui-home) | 
|  ![\[The File Browser icon.\]](http://docs.aws.amazon.com/sagemaker/latest/dg/images/studio/icons/folder@2x.png)  |  **File Browser** The **File Browser** displays lists of your notebooks, experiments, trials, trial components, endpoints, and low-code solutions. Whether you are in a personal or shared space determines who has access to your files. You can identify which type of space you are in by looking at the top right corner. If you are in a personal app, you see a user icon followed by *[user\$1name]*** / Personal Studio** and if you are in a collaborative space, you see a globe icon followed by "*[user\$1name] ***/** *[space\$1name].*" [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/sagemaker/latest/dg/studio-ui.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/sagemaker/latest/dg/studio-ui.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/sagemaker/latest/dg/studio-ui.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/sagemaker/latest/dg/studio-ui.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/sagemaker/latest/dg/studio-ui.html) [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/sagemaker/latest/dg/studio-ui.html) For hierarchical entries, a selectable breadcrumb at the top of the browser shows your location in the hierarchy.  | 
|  ![\[The Property Inspector icon.\]](http://docs.aws.amazon.com/sagemaker/latest/dg/images/studio/icons/gears@2x.png)  |  **Property Inspector** The Property Inspector is a notebook cell tools inspector which displays contextual property settings when open.  | 
|  ![\[The Running Terminals and Kernels icon.\]](http://docs.aws.amazon.com/sagemaker/latest/dg/images/studio/icons/running-terminals-kernels@2x.png)  |  **Running Terminals and Kernels** You can check the list of all the *kernels* and *terminals* currently running across all notebooks, code consoles, and directories. You can shut down individual resources, including notebooks, terminals, kernels, apps, and instances. You can also shut down all resources in one of these categories at the same time. For more information, see [Shut Down Resources from Amazon SageMaker Studio Classic](notebooks-run-and-manage-shut-down.md).  | 
|  ![\[The Git icon.\]](http://docs.aws.amazon.com/sagemaker/latest/dg/images/studio/icons/git@2x.png)  |  **Git** You can connect to a Git repository and then access a full range of Git tools and operations. For more information, see [Clone a Git Repository in Amazon SageMaker Studio Classic](studio-tasks-git.md).  | 
|  ![\[The Table of Contents icon.\]](http://docs.aws.amazon.com/sagemaker/latest/dg/images/studio/icons/table-of-contents@2x.png)  | **Table of Contents**You can navigate the structure of a document when a notebook or Python files are open. A table of contents is auto-generated in the left navigation panel when you have a notebook, Markdown files, or Python files opened. The entries are clickable and scroll the document to the heading in question. | 
|  ![\[The Extensions icon.\]](http://docs.aws.amazon.com/sagemaker/latest/dg/images/studio/icons/extensions@2x.png)  |  **Extensions** You can turn on and manage third-party JupyterLab extensions. You can check the already installed extensions and search for extensions by typing the name in the search bar. When you have found the extension you want to install, choose **Install**. After installing your new extensions, be sure to restart JupyterLab by refreshing your browser. For more information, see [JupyterLab Extensions documentation](https://jupyterlab.readthedocs.io/en/stable/user/extensions.html).  | 

### Left navigation panel
<a name="studio-ui-browser"></a>

The left navigation panel content varies with the Icon selected in the left sidebar.

For example, choosing the **Home** icon displays the navigation menu. Choosing **File browser** lists all the files and directories available in your workspace (notebooks, experiments, data flows, trials, trial components, endpoints, or low-code solutions).

In the navigation menu, choosing a node brings up the corresponding feature page in the main working area. For example, choosing **Data Wrangler** in the **Data** menu opens up the **Data Wrangler** tab listing all existing flows.

### Main working area
<a name="studio-ui-work"></a>

The main working area consists of multiple tabs that contain your open notebooks, terminals, and detailed information about your experiments and endpoints. In the main working area, you can arrange documents (such as notebooks and text files) and other activities (such as terminals and code consoles) into panels of tabs that you can resize or subdivide. Drag a tab to the center of a tab panel to move the tab to the panel. Subdivide a tab panel by dragging a tab to the left, right, top, or bottom of the panel. The tab for the current activity is marked with a colored top border (blue by default).

**Note**  
All feature pages provide in-product contextual help. To access help, choose **Show information**. The help interface provides a brief introduction to the tool and links to additional resources, such as videos, tutorials, or blogs.

# Launch Amazon SageMaker Studio Classic
<a name="studio-launch"></a>

**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 AI resources](security_iam_id-based-policy-examples.md#grant-tagging-permissions).  
[AWS managed policies for Amazon SageMaker AI](security-iam-awsmanpol.md) that give permissions to create SageMaker resources already include permissions to add tags while creating those resources.

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

After you have onboarded to an Amazon SageMaker AI domain, you can launch an Amazon SageMaker Studio Classic application from either the SageMaker AI console or the AWS CLI. For more information about onboarding to a domain, see [Amazon SageMaker AI domain overview](gs-studio-onboard.md).

**Topics**
+ [Launch Amazon SageMaker Studio Classic Using the Amazon SageMaker AI Console](#studio-launch-console)
+ [Launch Amazon SageMaker Studio Classic Using the AWS CLI](#studio-launch-cli)

## Launch Amazon SageMaker Studio Classic Using the Amazon SageMaker AI Console
<a name="studio-launch-console"></a>

The process to navigate to Studio Classic from the Amazon SageMaker AI Console differs depending on if Studio Classic or Amazon SageMaker Studio are set as the default experience for your domain. For more information about setting the default experience for your domain, see [Migration from Amazon SageMaker Studio Classic](studio-updated-migrate.md).

**Topics**
+ [Prerequisite](#studio-launch-console-prerequisites)

### Prerequisite
<a name="studio-launch-console-prerequisites"></a>

 To complete this procedure, you must onboard to a domain by following the steps in [Onboard to Amazon SageMaker AI domain](https://docs.aws.amazon.com//sagemaker/latest/dg/gs-studio-onboard.html). 

### Launch Studio Classic if Studio is your default experience
<a name="studio-launch-console-updated"></a>

1. Navigate to Studio following the steps in [Launch Amazon SageMaker Studio](studio-updated-launch.md).

1. From the Studio UI, find the applications pane on the left side.

1. From the applications pane, select **Studio Classic**.

1. From the Studio Classic landing page, select the Studio Classic instance to open.

1. Choose “Open”.

### Launch Studio Classic if Studio Classic is your default experience
<a name="studio-launch-console-classic"></a>

When Studio Classic is your default experience, you can launch a Amazon SageMaker Studio Classic application from the SageMaker AI console using the Studio Classic landing page or the Amazon SageMaker AI domain details page. The following sections demonstrate how to launch the Studio Classic application from the SageMaker AI console.

#### Launch Studio Classic from the domain details page
<a name="studio-launch-console-details"></a>

The following sections describe how to launch a Studio Classic application from the domain details page. The steps to launch the Studio Classic application after you have navigated to the domain details page differ depending on if you’re launching a personal application or a shared space. 

 **Navigate to the domain details page** 

 The following procedure shows how to navigate to the domain details page. 

1. Open the Amazon SageMaker AI console at [https://console.aws.amazon.com/sagemaker/](https://console.aws.amazon.com/sagemaker/).

1. On the left navigation pane, choose **Admin configurations**.

1. Under **Admin configurations**, choose **domains**. 

1. From the list of domain, select the domain that you want to launch the Studio Classic application in.

 **Launch a user profile app** 

 The following procedure shows how to launch a Studio Classic application that is scoped to a user profile. 

1.  On the domain details page, choose the **User profiles** tab. 

1.  Identify the user profile that you want to launch the Studio Classic application for. 

1.  Choose **Launch** for your selected user profile, then choose **Studio Classic**. 

 **Launch a shared space app** 

 The following procedure shows how to launch a Studio Classic application that is scoped to a shared space. 

1.  On the domain details page, choose the **Space management** tab. 

1.  Identify the shared space that you want to launch the Studio Classic application for. 

1.  Choose **Launch Studio Classic** for your selected shared space. 

#### Launch Studio Classic from the Studio Classic landing page
<a name="studio-launch-console-landing"></a>

 The following procedure describes how to launch a Studio Classic application from the Studio Classic landing page. 

 **Launch Studio Classic** 

1. Open the Amazon SageMaker AI console at [https://console.aws.amazon.com/sagemaker/](https://console.aws.amazon.com/sagemaker/).

1. On the left navigation pane, choose Studio Classic.

1.  Under **Get started**, select the domain that you want to launch the Studio Classic application in. If your user profile only belongs to one domain, you do not see the option for selecting a domain.

1.  Select the user profile that you want to launch the Studio Classic application for. If there is no user profile in the domain, choose **Create user profile**. For more information, see [Add user profiles](domain-user-profile-add.md).

1.  Choose **Launch Studio Classic**. If the user profile belongs to a shared space, choose **Open Spaces**. 

1.  To launch a Studio Classic application scoped to a user profile, choose **Launch personal Studio Classic**. 

1.  To launch a shared Studio Classic application, choose the **Launch shared Studio Classic** button next to the shared space that you want to launch into. 

## Launch Amazon SageMaker Studio Classic Using the AWS CLI
<a name="studio-launch-cli"></a>

You can use the AWS Command Line Interface (AWS CLI) to launch Amazon SageMaker Studio Classic by creating a presigned domain URL.

 **Prerequisites** 

 Before you begin, complete the following prerequisites: 
+  Onboard to Amazon SageMaker AI domain. For more information, see [Onboard to Amazon SageMaker AI domain](https://docs.aws.amazon.com//sagemaker/latest/dg/gs-studio-onboard.html). 
+  Update the AWS CLI by following the steps in [Installing the current AWS CLI Version](https://docs.aws.amazon.com//cli/latest/userguide/install-cliv1.html#install-tool-bundled). 
+  From your local machine, run `aws configure` and provide your AWS credentials. For information about AWS credentials, see [Understanding and getting your AWS credentials](https://docs.aws.amazon.com//general/latest/gr/aws-sec-cred-types.html). 

The following code snippet demonstrates how to launch Amazon SageMaker Studio Classic from the AWS CLI using a presigned domain URL. For more information, see [create-presigned-domain-url](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/sagemaker/create-presigned-domain-url.html).

```
aws sagemaker create-presigned-domain-url \
--region region \
--domain-id domain-id \
--space-name space-name \
--user-profile-name user-profile-name \
--session-expiration-duration-in-seconds 43200
```

# JupyterLab Versioning in Amazon SageMaker Studio Classic
<a name="studio-jl"></a>

**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 AI resources](security_iam_id-based-policy-examples.md#grant-tagging-permissions).  
[AWS managed policies for Amazon SageMaker AI](security-iam-awsmanpol.md) that give permissions to create SageMaker resources already include permissions to add tags while creating those resources.

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

The Amazon SageMaker Studio Classic interface is based on JupyterLab, which is a web-based interactive development environment for notebooks, code, and data. Studio Classic only supports using JupyterLab 3.

If you created your domain and user profile using the AWS Management Console before 08/31/2022 or using the AWS Command Line Interface before 02/22/23, then your Studio Classic instance defaulted to JupyterLab 1. After 07/01/2024, you cannot create any Studio Classic applications that run JupyterLab 1.

## JupyterLab 3
<a name="jl3"></a>

JupyterLab 3 includes the following features that are not available in previous versions. For more information about these features, see [JupyterLab 3.0 is released\$1](https://blog.jupyter.org/jupyterlab-3-0-is-out-4f58385e25bb). 
+ Visual debugger when using the Base Python 2.0 and Data Science 2.0 kernels.
+ File browser filter 
+ Table of Contents (TOC) 
+ Multi-language support 
+ Simple mode 
+ Single interface mode 

### Important changes to JupyterLab 3
<a name="jl3-changes"></a>

 Consider the following when using JupyterLab 3: 
+ When setting the JupyterLab version using the AWS CLI, select the corresponding image for your Region and JupyterLab version from the image list in [From the AWS CLI](#studio-jl-set-cli).
+ In JupyterLab 3, you must activate the `studio` conda environment before installing extensions. For more information, see [Installing JupyterLab and Jupyter Server extensions](#studio-jl-install).
+ Debugger is only supported when using the following images: 
  + Base Python 2.0
  + Data Science 2.0
  + Base Python 3.0
  + Data Science 3.0

## Restricting default JupyterLab version using an IAM policy condition key
<a name="iam-policy"></a>

You can use IAM policy condition keys to restrict the version of JupyterLab that your users can launch.

The following policy shows how to limit the JupyterLab version at the domain level. 

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "BlockJupyterLab3DomainLevelAppCreation",
            "Effect": "Deny",
            "Action": [
                "sagemaker:CreateDomain",
                "sagemaker:UpdateDomain"
            ],
            "Resource": "*",
            "Condition": {
                "ForAnyValue:ArnLike": {
                    "sagemaker:ImageArns": "arn:aws:sagemaker:us-east-1:111122223333:image/jupyter-server-3"
                }
            }
        }
    ]
}
```

------

The following policy shows how to limit the JupyterLab version at the user profile level. 

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "BlockUsersFromCreatingJupyterLab3Apps",
            "Effect": "Deny",
            "Action": [
                "sagemaker:CreateUserProfile",
                "sagemaker:UpdateUserProfile"
            ],
            "Resource": "*",
            "Condition": {
                "ForAnyValue:ArnLike": {
                    "sagemaker:ImageArns": "arn:aws:sagemaker:us-east-1:111122223333:image/jupyter-server-3"
                }
            }
        }
    ]
}
```

------

The following policy shows how to limit the JupyterLab version at the application level. The `CreateApp` request must include the image ARN for this policy to apply.

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "BlockJupyterLab3AppLevelAppCreation",
            "Effect": "Deny",
            "Action": "sagemaker:CreateApp",
            "Resource": "*",
            "Condition": {
                "ForAnyValue:ArnLike": {
                    "sagemaker:ImageArns": "arn:aws:sagemaker:us-east-1:111122223333:image/jupyter-server-3"
                }
            }
        }
    ]
}
```

------

## Setting a default JupyterLab version
<a name="studio-jl-set"></a>

The following sections show how to set a default JupyterLab version for Studio Classic using either the console or the AWS CLI.  

### From the console
<a name="studio-jl-set-console"></a>

 You can select the default JupyterLab version to use on either the domain or user profile level during resource creation. To set the default JupyterLab version using the console, see [Amazon SageMaker AI domain overview](gs-studio-onboard.md).  

### From the AWS CLI
<a name="studio-jl-set-cli"></a>

 You can select the default JupyterLab version to use on either the domain or user profile level using the AWS CLI.  

 To set the default JupyterLab version using the AWS CLI, you must include the ARN of the desired default JupyterLab version as part of an AWS CLI command. This ARN differs based on the version and the Region of the SageMaker AI domain.  

The following table lists the ARNs of the available JupyterLab versions for each Region:


|  Region  |  JL3  | 
| --- | --- | 
|  us-east-1  |  arn:aws:sagemaker:us-east-1:081325390199:image/jupyter-server-3  | 
|  us-east-2  |  arn:aws:sagemaker:us-east-2:429704687514:image/jupyter-server-3  | 
|  us-west-1  |  arn:aws:sagemaker:us-west-1:742091327244:image/jupyter-server-3  | 
|  us-west-2  |  arn:aws:sagemaker:us-west-2:236514542706:image/jupyter-server-3  | 
|  af-south-1  |  arn:aws:sagemaker:af-south-1:559312083959:image/jupyter-server-3  | 
|  ap-east-1  |  arn:aws:sagemaker:ap-east-1:493642496378:image/jupyter-server-3  | 
|  ap-south-1  |  arn:aws:sagemaker:ap-south-1:394103062818:image/jupyter-server-3  | 
|  ap-northeast-2  |  arn:aws:sagemaker:ap-northeast-2:806072073708:image/jupyter-server-3  | 
|  ap-southeast-1  |  arn:aws:sagemaker:ap-southeast-1:492261229750:image/jupyter-server-3  | 
|  ap-southeast-2  |  arn:aws:sagemaker:ap-southeast-2:452832661640:image/jupyter-server-3  | 
|  ap-northeast-1  |  arn:aws:sagemaker:ap-northeast-1:102112518831:image/jupyter-server-3  | 
|  ca-central-1  |  arn:aws:sagemaker:ca-central-1:310906938811:image/jupyter-server-3  | 
|  eu-central-1  |  arn:aws:sagemaker:eu-central-1:936697816551:image/jupyter-server-3  | 
|  eu-west-1  |  arn:aws:sagemaker:eu-west-1:470317259841:image/jupyter-server-3  | 
|  eu-west-2  |  arn:aws:sagemaker:eu-west-2:712779665605:image/jupyter-server-3  | 
|  eu-west-3  |  arn:aws:sagemaker:eu-west-3:615547856133:image/jupyter-server-3  | 
|  eu-north-1  |  arn:aws:sagemaker:eu-north-1:243637512696:image/jupyter-server-3  | 
|  eu-south-1  |  arn:aws:sagemaker:eu-south-1:592751261982:image/jupyter-server-3  | 
|  eu-south-2  |  arn:aws:sagemaker:eu-south-2:127363102723:image/jupyter-server-3  | 
|  sa-east-1  |  arn:aws:sagemaker:sa-east-1:782484402741:image/jupyter-server-3  | 
|  cn-north-1  |  arn:aws-cn:sagemaker:cn-north-1:390048526115:image/jupyter-server-3  | 
|  cn-northwest-1  |  arn:aws-cn:sagemaker:cn-northwest-1:390780980154:image/jupyter-server-3  | 

#### Create or update domain
<a name="studio-jl-set-cli-domain"></a>

 You can set a default JupyterServer version at the domain level by invoking [CreateDomain](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateDomain.html) or [UpdateDomain](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UpdateDomain.html) and passing the `UserSettings.JupyterServerAppSettings.DefaultResourceSpec.SageMakerImageArn` field. 

 The following shows how to create a domain with JupyterLab 3 as the default, using the AWS CLI: 

```
aws --region <REGION> \
sagemaker create-domain \
--domain-name <NEW_DOMAIN_NAME> \
--auth-mode <AUTHENTICATION_MODE> \
--subnet-ids <SUBNET-IDS> \
--vpc-id <VPC-ID> \
--default-user-settings '{
  "JupyterServerAppSettings": {
    "DefaultResourceSpec": {
      "SageMakerImageArn": "arn:aws:sagemaker:<REGION>:<ACCOUNT_ID>:image/jupyter-server-3",
      "InstanceType": "system"
    }
  }
}'
```

 The following shows how to update a domain to use JupyterLab 3 as the default, using the AWS CLI: 

```
aws --region <REGION> \
sagemaker update-domain \
--domain-id <YOUR_DOMAIN_ID> \
--default-user-settings '{
  "JupyterServerAppSettings": {
    "DefaultResourceSpec": {
      "SageMakerImageArn": "arn:aws:sagemaker:<REGION>:<ACCOUNT_ID>:image/jupyter-server-3",
      "InstanceType": "system"
    }
  }
}'
```

#### Create or update user profile
<a name="studio-jl-set-cli-user"></a>

 You can set a default JupyterServer version at the user profile level by invoking [CreateUserProfile](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateUserProfile.html) or [UpdateUserProfile](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_UpdateUserProfile.html) and passing the `UserSettings.JupyterServerAppSettings.DefaultResourceSpec.SageMakerImageArn` field. 

 The following shows how to create a user profile with JupyterLab 3 as the default on an existing domain, using the AWS CLI: 

```
aws --region <REGION> \
sagemaker create-user-profile \
--domain-id <YOUR_DOMAIN_ID> \
--user-profile-name <NEW_USERPROFILE_NAME> \
--query UserProfileArn --output text \
--user-settings '{
  "JupyterServerAppSettings": {
    "DefaultResourceSpec": {
      "SageMakerImageArn": "arn:aws:sagemaker:<REGION>:<ACCOUNT_ID>:image/jupyter-server-3",
      "InstanceType": "system"
    }
  }
}'
```

 The following shows how to update a user profile to use JupyterLab 3 as the default, using the AWS CLI: 

```
aws --region <REGION> \
sagemaker update-user-profile \
 --domain-id <YOUR_DOMAIN_ID> \
 --user-profile-name <EXISTING_USERPROFILE_NAME> \
--user-settings '{
  "JupyterServerAppSettings": {
    "DefaultResourceSpec": {
      "SageMakerImageArn": "arn:aws:sagemaker:<REGION>:<ACCOUNT_ID>:image/jupyter-server-3",
      "InstanceType": "system"
    }
  }
}'
```

## View and update the JupyterLab version of an application from the console
<a name="studio-jl-view"></a>

 The following shows how to view and update the JupyterLab version of an application. 

1.  Navigate to the SageMaker AI **domains** page. 

1.  Select a domain to view its user profiles. 

1.  Select a user to view their applications. 

1.  To view the JupyterLab version of an application, select the application's name. 

1.  To update the JupyterLab version, select **Action**. 

1.  From the dropdown menu, select **Change JupyterLab version**. 

1.  From the **Studio Classic settings** page, select the JupyterLab version from the dropdown menu. 

1.  After the JupyterLab version for the user profile has been successfully updated, restart the JupyterServer application to make the version changes effective. For more information about restarting a JupyterServer application, see [Shut Down and Update Amazon SageMaker Studio Classic](studio-tasks-update-studio.md).

## Installing JupyterLab and Jupyter Server extensions
<a name="studio-jl-install"></a>

In JupyterLab 3, you must activate the `studio` conda environment before installing extensions. The method for this differs if you're installing the extensions from within Studio Classic or using a lifecycle configuration script.

### Installing Extension from within Studio Classic
<a name="studio-jl-install-studio"></a>

To install extensions from within Studio Classic, you must activate the `studio` environment before you install extensions. 

```
# Before installing extensions
conda activate studio

# Install your extensions
pip install <JUPYTER_EXTENSION>

# After installing extensions
conda deactivate
```

### Installing Extensions using a lifecycle configuration script
<a name="studio-jl-install-lcc"></a>

If you're installing JupyterLab and Jupyter Server extensions in your lifecycle configuration script, you must modify your script so that it works with JupyterLab 3. The following sections show the code needed for existing and new lifecycle configuration scripts.

#### Existing lifecycle configuration script
<a name="studio-jl-install-lcc-existing"></a>

If you're reusing an existing lifecycle configuration script that must work with both versions of JupyterLab, use the following code in your script:

```
# Before installing extension
export AWS_SAGEMAKER_JUPYTERSERVER_IMAGE="${AWS_SAGEMAKER_JUPYTERSERVER_IMAGE:-'jupyter-server'}"
if [ "$AWS_SAGEMAKER_JUPYTERSERVER_IMAGE" = "jupyter-server-3" ] ; then
   eval "$(conda shell.bash hook)"
   conda activate studio
fi;

# Install your extensions
pip install <JUPYTER_EXTENSION>


# After installing extension
if [ "$AWS_SAGEMAKER_JUPYTERSERVER_IMAGE" = "jupyter-server-3" ]; then
   conda deactivate
fi;
```

#### New lifecycle configuration script
<a name="studio-jl-install-lcc-new"></a>

If you're writing a new lifecycle configuration script that only uses JupyterLab 3, you can use the following code in your script:

```
# Before installing extension
eval "$(conda shell.bash hook)"
conda activate studio


# Install your extensions
pip install <JUPYTER_EXTENSION>


conda deactivate
```

# Use the Amazon SageMaker Studio Classic Launcher
<a name="studio-launcher"></a>

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

You can use the Amazon SageMaker Studio Classic Launcher to create notebooks and text files, and to launch terminals and interactive Python shells.

You can open Studio Classic Launcher in any of the following ways:
+ Choose **Amazon SageMaker Studio Classic** at the top left of the Studio Classic interface.
+ Use the keyboard shortcut `Ctrl + Shift + L`.
+ From the Studio Classic menu, choose **File** and then choose **New Launcher**.
+ If the SageMaker AI file browser is open, choose the plus (**\$1**) sign in the Studio Classic file browser menu.
+ In the **Quick actions** section of the **Home** tab, choose **Open Launcher**. The Launcher opens in a new tab. The **Quick actions** section is visible by default but can be toggled off. Choose **Customize Layout** to turn this section back on.

![\[SageMaker Studio Classic launcher.\]](http://docs.aws.amazon.com/sagemaker/latest/dg/images/studio/studio-new-launcher.png)


The Launcher consists of the following two sections:

**Topics**
+ [Notebooks and compute resources](#studio-launcher-launch)
+ [Utilities and files](#studio-launcher-other)

## Notebooks and compute resources
<a name="studio-launcher-launch"></a>

In this section, you can create a notebook, open an image terminal, or open a Python console.

To create or launch one of those items:

1. Choose **Change environment** to select a SageMaker image, a kernel, an instance type, and, optionally, add a lifecycle configuration script that runs on image start-up. For more information on lifecycle configuration scripts, see [Use Lifecycle Configurations to Customize Amazon SageMaker Studio Classic](studio-lcc.md). For more information about kernel updates, see [Change the Image or a Kernel for an Amazon SageMaker Studio Classic Notebook](notebooks-run-and-manage-change-image.md).

1. Select an item.

**Note**  
When you choose an item from this section, you might incur additional usage charges. For more information, see [Usage Metering for Amazon SageMaker Studio Classic Notebooks](notebooks-usage-metering.md).

The following items are available:
+ **Notebook**

  Launches the notebook in a kernel session on the chosen SageMaker image.

  Creates the notebook in the folder that you have currently selected in the file browser. To view the file browser, in the left sidebar of Studio Classic, choose the **File Browser** icon.
+ **Console**

  Launches the shell in a kernel session on the chosen SageMaker image.

  Opens the shell in the folder that you have currently selected in the file browser.
+ **Image terminal**

  Launches the terminal in a terminal session on the chosen SageMaker image.

  Opens the terminal in the root folder for the user (as shown by the **Home** folder in the file browser).

**Note**  
By default, CPU instances launch on a `ml.t3.medium` instance, while GPU instances launch on a `ml.g4dn.xlarge` instance.

## Utilities and files
<a name="studio-launcher-other"></a>

In this section, you can add contextual help in a notebook; create Python, Markdown and text files; and open a system terminal.

**Note**  
Items in this section run in the context of Amazon SageMaker Studio Classic and don't incur usage charges.

The following items are available:
+ **Show Contextual Help**

  Opens a new tab that displays contextual help for functions in a Studio Classic notebook. To display the help, choose a function in an active notebook. To make it easier to see the help in context, drag the help tab so that it's adjacent to the notebook tab. To open the help tab from within a notebook, press `Ctrl + I`.

  The following screenshot shows the contextual help for the `Experiment.create` method.  
![\[SageMaker Studio Classic contextual help.\]](http://docs.aws.amazon.com/sagemaker/latest/dg/images/studio/studio-context-help.png)
+ **System terminal**

  Opens a `bash` shell in the root folder for the user (as shown by the **Home** folder in the file browser).
+ **Text File** and **Markdown File**

  Creates a file of the associated type in the folder that you have currently selected in the file browser. To view the file browser, in the left sidebar, choose the **File Browser** icon (![\[Black square icon representing a placeholder or empty image.\]](http://docs.aws.amazon.com/sagemaker/latest/dg/images/studio/icons/folder.png)).

# Use Amazon SageMaker Studio Classic Notebooks
<a name="notebooks"></a>

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

Amazon SageMaker Studio Classic notebooks are collaborative notebooks that you can launch quickly because you don't need to set up compute instances and file storage beforehand. Studio Classic notebooks provide persistent storage, which enables you to view and share notebooks even if the instances that the notebooks run on are shut down.

You can share your notebooks with others, so that they can easily reproduce your results and collaborate while building models and exploring your data. You provide access to a read-only copy of the notebook through a secure URL. Dependencies for your notebook are included in the notebook's metadata. When your colleagues copy the notebook, it opens in the same environment as the original notebook.

A Studio Classic notebook runs in an environment defined by the following:
+ Amazon EC2 instance type – The hardware configuration the notebook runs on. The configuration includes the number and type of processors (vCPU and GPU), and the amount and type of memory. The instance type determines the pricing rate.
+ SageMaker image – A container image that is compatible with SageMaker Studio Classic. The image consists of the kernels, language packages, and other files required to run a notebook in Studio Classic. There can be multiple images in an instance. For more information, see [Custom Images in Amazon SageMaker Studio Classic](studio-byoi.md).
+ KernelGateway app – A SageMaker image runs as a KernelGateway app. The app provides access to the kernels in the image. There is a one-to-one correspondence between a SageMaker AI image and a KernelGateway app.
+ Kernel – The process that inspects and runs the code contained in the notebook. A kernel is defined by a *kernel spec* in the image. There can be multiple kernels in an image.

You can change any of these resources from within the notebook.

The following diagram outlines how a notebook kernel runs in relation to the KernelGateway App, User, and domain.

![\[How a notebook kernel runs in relation to the KernelGateway App, User, and domain.\]](http://docs.aws.amazon.com/sagemaker/latest/dg/images/studio/studio-components.png)


Sample SageMaker Studio Classic notebooks are available in the [aws\$1sagemaker\$1studio](https://github.com/awslabs/amazon-sagemaker-examples/tree/master/aws_sagemaker_studio) folder of the [Amazon SageMaker example GitHub repository](https://github.com/awslabs/amazon-sagemaker-examples). Each notebook comes with the necessary SageMaker image that opens the notebook with the appropriate kernel.

We recommend that you familiarize yourself with the SageMaker Studio Classic interface and the Studio Classic notebook toolbar before creating or using a Studio Classic notebook. For more information, see [Amazon SageMaker Studio Classic UI Overview](studio-ui.md) and [Use the Studio Classic Notebook Toolbar](notebooks-menu.md).

**Topics**
+ [How Are Amazon SageMaker Studio Classic Notebooks Different from Notebook Instances?](notebooks-comparison.md)
+ [Get Started with Amazon SageMaker Studio Classic Notebooks](notebooks-get-started.md)
+ [Amazon SageMaker Studio Classic Tour](gs-studio-end-to-end.md)
+ [Create or Open an Amazon SageMaker Studio Classic Notebook](notebooks-create-open.md)
+ [Use the Studio Classic Notebook Toolbar](notebooks-menu.md)
+ [Install External Libraries and Kernels in Amazon SageMaker Studio Classic](studio-notebooks-add-external.md)
+ [Share and Use an Amazon SageMaker Studio Classic Notebook](notebooks-sharing.md)
+ [Get Amazon SageMaker Studio Classic Notebook and App Metadata](notebooks-run-and-manage-metadata.md)
+ [Get Notebook Differences in Amazon SageMaker Studio Classic](notebooks-diff.md)
+ [Manage Resources for Amazon SageMaker Studio Classic Notebooks](notebooks-run-and-manage.md)
+ [Usage Metering for Amazon SageMaker Studio Classic Notebooks](notebooks-usage-metering.md)
+ [Available Resources for Amazon SageMaker Studio Classic Notebooks](notebooks-resources.md)

# How Are Amazon SageMaker Studio Classic Notebooks Different from Notebook Instances?
<a name="notebooks-comparison"></a>

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

When you're starting a new notebook, we recommend that you create the notebook in Amazon SageMaker Studio Classic instead of launching a notebook instance from the Amazon SageMaker AI console. There are many benefits to using a Studio Classic notebook, including the following:
+ **Faster: **Starting a Studio Classic notebook is faster than launching an instance-based notebook. Typically, it is 5-10 times faster than instance-based notebooks.
+ **Easy notebook sharing: **Notebook sharing is an integrated feature in Studio Classic. Users can generate a shareable link that reproduces the notebook code and also the SageMaker image required to execute it, in just a few clicks.
+ **Latest Python SDK: **Studio Classic notebooks come pre-installed with the latest [Amazon SageMaker Python SDK](https://sagemaker.readthedocs.io/en/stable).
+ **Access all Studio Classic features: **Studio Classic notebooks are accessed from within Studio Classic. This enables you to build, train, debug, track, and monitor your models without leaving Studio Classic.
+ **Persistent user directories:** Each member of a Studio team gets their own home directory to store their notebooks and other files. The directory is automatically mounted onto all instances and kernels as they're started, so their notebooks and other files are always available. The home directories are stored in Amazon Elastic File System (Amazon EFS) so that you can access them from other services.
+ **Direct access:** When using IAM Identity Center, you use your IAM Identity Center credentials through a unique URL to directly access Studio Classic. You don't have to interact with the AWS Management Console to run your notebooks.
+ **Optimized images:** Studio Classic notebooks are equipped with a set of predefined SageMaker image settings to get you started faster.

**Note**  
Studio Classic notebooks don't support *local mode*. However, you can use a notebook instance to train a sample of your dataset locally, and then use the same code in a Studio Classic notebook to train on the full dataset.

When you open a notebook in SageMaker Studio Classic, the view is an extension of the JupyterLab interface. The primary features are the same, so you'll find the typical features of a Jupyter notebook and JupyterLab. For more information about the Studio Classic interface, see [Amazon SageMaker Studio Classic UI Overview](studio-ui.md).

# Get Started with Amazon SageMaker Studio Classic Notebooks
<a name="notebooks-get-started"></a>

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

To get started, you or your organization's administrator need to complete the SageMaker AI domain onboarding process. For more information, see [Amazon SageMaker AI domain overview](gs-studio-onboard.md).

You can access a Studio Classic notebook in any of the following ways:
+ You receive an email invitation to access Studio Classic through your organization's IAM Identity Center, which includes a direct link to login to Studio Classic without having to use the Amazon SageMaker AI console. You can proceed to the [Next Steps](#notebooks-get-started-next-steps).
+ You receive a link to a shared Studio Classic notebook, which includes a direct link to log in to Studio Classic without having to use the SageMaker AI console. You can proceed to the [Next Steps](#notebooks-get-started-next-steps). 
+ You onboard to a domain and then log in to the SageMaker AI console. For more information, see [Amazon SageMaker AI domain overview](gs-studio-onboard.md).

## Launch Amazon SageMaker AI
<a name="notebooks-get-started-log-in"></a>

Complete the steps in [Launch Amazon SageMaker Studio Classic](studio-launch.md) to launch Studio Classic.

## Next Steps
<a name="notebooks-get-started-next-steps"></a>

Now that you're in Studio Classic, you can try any of the following options:
+ To create a Studio Classic notebook or explore Studio Classic end-to-end tutorial notebooks – See [Amazon SageMaker Studio Classic Tour](gs-studio-end-to-end.md) in the next section.
+ To familiarize yourself with the Studio Classic interface – See [Amazon SageMaker Studio Classic UI Overview](studio-ui.md) or try the **Getting started notebook** by selecting **Open the Getting started notebook** in the **Quick actions** section of the Studio Classic Home page.

# Amazon SageMaker Studio Classic Tour
<a name="gs-studio-end-to-end"></a>

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

For a walkthrough that takes you on a tour of the main features of Amazon SageMaker Studio Classic, see the [xgboost\$1customer\$1churn\$1studio.ipynb](https://sagemaker-examples.readthedocs.io/en/latest/aws_sagemaker_studio/getting_started/xgboost_customer_churn_studio.html) sample notebook from the [aws/amazon-sagemaker-examples](https://github.com/aws/amazon-sagemaker-examples) GitHub repository. The code in the notebook trains multiple models and sets up the SageMaker Debugger and SageMaker Model Monitor. The walkthrough shows you how to view the trials, compare the resulting models, show the debugger results, and deploy the best model using the Studio Classic UI. You don't need to understand the code to follow this walkthrough.

**Prerequisites**

To run the notebook for this tour, you need:
+ An IAM account to sign in to Studio. For information, see [Amazon SageMaker AI domain overview](gs-studio-onboard.md).
+ Basic familiarity with the Studio user interface and Jupyter notebooks. For information, see [Amazon SageMaker Studio Classic UI Overview](studio-ui.md).
+ A copy of the [aws/amazon-sagemaker-examples](https://github.com/aws/amazon-sagemaker-examples) repository in your Studio environment.

**To clone the repository**

1. Launch Studio Classic following the steps in [Launch Amazon SageMaker Studio Classic](studio-launch.md) For users in IAM Identity Center, sign in using the URL from your invitation email.

1. On the top menu, choose **File**, then **New**, then **Terminal**.

1. At the command prompt, run the following command to clone the [aws/amazon-sagemaker-examples](https://github.com/aws/amazon-sagemaker-examples) GitHub repository.

   ```
   $ git clone https://github.com/aws/amazon-sagemaker-examples.git
   ```

**To navigate to the sample notebook**

1. From the **File Browser** on the left menu, select **amazon-sagemaker-examples**.

1. Navigate to the example notebook with the following path.

   `~/amazon-sagemaker-examples/aws_sagemaker_studio/getting_started/xgboost_customer_churn_studio.ipynb`

1. Follow the notebook to learn about Studio Classic's main features.

**Note**  
If you encounter an error when you run the sample notebook, and some time has passed from when you cloned the repository, review the notebook on the remote repository for updates.

# Create or Open an Amazon SageMaker Studio Classic Notebook
<a name="notebooks-create-open"></a>

**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 AI resources](security_iam_id-based-policy-examples.md#grant-tagging-permissions).  
[AWS managed policies for Amazon SageMaker AI](security-iam-awsmanpol.md) that give permissions to create SageMaker resources already include permissions to add tags while creating those resources.

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

When you [Create a Notebook from the File Menu](#notebooks-create-file-menu) in Amazon SageMaker Studio Classic or [Open a notebook in Studio Classic](#notebooks-open) for the first time, you are prompted to set up your environment by choosing a SageMaker image, a kernel, an instance type, and, optionally, a lifecycle configuration script that runs on image start-up. SageMaker AI launches the notebook on an instance of the chosen type. By default, the instance type is set to `ml.t3.medium` (available as part of the [AWS Free Tier](https://aws.amazon.com/free)) for CPU-based images. For GPU-based images, the default instance type is `ml.g4dn.xlarge`.

If you create or open additional notebooks that use the same instance type, whether or not the notebooks use the same kernel, the notebooks run on the same instance of that instance type.

After you launch a notebook, you can change its instance type, SageMaker image, and kernel from within the notebook. For more information, see [Change the Instance Type for an Amazon SageMaker Studio Classic Notebook](notebooks-run-and-manage-switch-instance-type.md) and [Change the Image or a Kernel for an Amazon SageMaker Studio Classic Notebook](notebooks-run-and-manage-change-image.md).

**Note**  
You can have only one instance of each instance type. Each instance can have multiple SageMaker images running on it. Each SageMaker image can run multiple kernels or terminal instances. 

Billing occurs per instance and starts when the first instance of a given instance type is launched. If you want to create or open a notebook without the risk of incurring charges, open the notebook from the **File** menu and choose **No Kernel** from the **Select Kernel** dialog box. You can read and edit a notebook without a running kernel but you can't run cells.

Billing ends when the SageMaker image for the instance is shut down. For more information, see [Usage Metering for Amazon SageMaker Studio Classic Notebooks](notebooks-usage-metering.md).

For information about shutting down the notebook, see [Shut down resources](notebooks-run-and-manage-shut-down.md#notebooks-run-and-manage-shut-down-sessions).

**Topics**
+ [Open a notebook in Studio Classic](#notebooks-open)
+ [Create a Notebook from the File Menu](#notebooks-create-file-menu)
+ [Create a Notebook from the Launcher](#notebooks-create-launcher)
+ [List of the available instance types, images, and kernels](#notebooks-instance-image-kernels)

## Open a notebook in Studio Classic
<a name="notebooks-open"></a>

Amazon SageMaker Studio Classic can only open notebooks listed in the Studio Classic file browser. For instructions on uploading a notebook to the file browser, see [Upload Files to Amazon SageMaker Studio Classic](studio-tasks-files.md) or [Clone a Git Repository in Amazon SageMaker Studio Classic](studio-tasks-git.md).

**To open a notebook**

1. In the left sidebar, choose the **File Browser** icon ( ![\[Black square icon representing a placeholder or empty image.\]](http://docs.aws.amazon.com/sagemaker/latest/dg/images/studio/icons/folder.png)) to display the file browser.

1. Browse to a notebook file and double-click it to open the notebook in a new tab.

## Create a Notebook from the File Menu
<a name="notebooks-create-file-menu"></a>

**To create a notebook from the File menu**

1. From the Studio Classic menu, choose **File**, choose **New**, and then choose **Notebook**.

1. In the **Change environment** dialog box, use the dropdown menus to select your **Image**, **Kernel**, **Instance type**, and **Start-up script**, then choose **Select**. Your notebook launches and opens in a new Studio Classic tab.  
![\[Studio Classic notebook environment setup.\]](http://docs.aws.amazon.com/sagemaker/latest/dg/images/studio/studio-notebook-environment-setup.png)

## Create a Notebook from the Launcher
<a name="notebooks-create-launcher"></a>

**To create a notebook from the Launcher**

1. To open the Launcher, choose **Amazon SageMaker Studio Classic** at the top left of the Studio Classic interface or use the keyboard shortcut `Ctrl + Shift + L`.

   To learn about all the available ways to open the Launcher, see [Use the Amazon SageMaker Studio Classic Launcher](studio-launcher.md)

1. In the Launcher, in the **Notebooks and compute resources** section, choose **Change environment**.  
![\[SageMaker Studio Classic set notebook environment.\]](http://docs.aws.amazon.com/sagemaker/latest/dg/images/studio/studio-launcher-notebook-creation.png)

1. In the **Change environment** dialog box, use the dropdown menus to select your **Image**, **Kernel**, **Instance type**, and **Start-up script**, then choose **Select**.

1. In the Launcher, choose **Create notebook**. Your notebook launches and opens in a new Studio Classic tab.

To view the notebook's kernel session, in the left sidebar, choose the **Running Terminals and Kernels** icon (![\[Black square icon representing a placeholder or empty image.\]](http://docs.aws.amazon.com/sagemaker/latest/dg/images/studio/icons/running-terminals-kernels.png)). You can stop the notebook's kernel session from this view.

## List of the available instance types, images, and kernels
<a name="notebooks-instance-image-kernels"></a>

For a list of all available resources, see:
+ [Instance Types Available for Use With Amazon SageMaker Studio Classic Notebooks](notebooks-available-instance-types.md)
+ [Amazon SageMaker Images Available for Use With Studio Classic Notebooks](notebooks-available-images.md)

# Use the Studio Classic Notebook Toolbar
<a name="notebooks-menu"></a>

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

Amazon SageMaker Studio Classic notebooks extend the JupyterLab interface. For an overview of the original JupyterLab interface, see [The JupyterLab Interface](https://jupyterlab.readthedocs.io/en/latest/user/interface.html).

The following image shows the toolbar and an empty cell from a Studio Classic notebook.

![\[SageMaker Studio Classic notebook menu.\]](http://docs.aws.amazon.com/sagemaker/latest/dg/images/studio/studio-notebook-menu.png)


When you pause on a toolbar icon, a tooltip displays the icon function. Additional notebook commands are found in the Studio Classic main menu. The toolbar includes the following icons:


| Icon | Description | 
| --- | --- | 
|  ![\[The Save and checkpoint icon.\]](http://docs.aws.amazon.com/sagemaker/latest/dg/images/studio/icons/notebook-save-and-checkpoint.png)  |  **Save and checkpoint** Saves the notebook and updates the checkpoint file. For more information, see [Get the Difference Between the Last Checkpoint](notebooks-diff.md#notebooks-diff-checkpoint).  | 
|  ![\[The Insert cell icon.\]](http://docs.aws.amazon.com/sagemaker/latest/dg/images/studio/icons/notebook-insert-cell.png)  |  **Insert cell** Inserts a code cell below the current cell. The current cell is noted by the blue vertical marker in the left margin.  | 
|  ![\[The Cut, copy, and paste cells icons.\]](http://docs.aws.amazon.com/sagemaker/latest/dg/images/studio/icons/notebook-cut-copy-paste.png)  |  **Cut, copy, and paste cells** Cuts, copies, and pastes the selected cells.  | 
|  ![\[The Run cells icon.\]](http://docs.aws.amazon.com/sagemaker/latest/dg/images/studio/icons/notebook-run.png)  |  **Run cells** Runs the selected cells and then makes the cell that follows the last selected cell the new selected cell.  | 
|  ![\[The Interrupt kernel icon.\]](http://docs.aws.amazon.com/sagemaker/latest/dg/images/studio/icons/notebook-interrupt-kernel.png)  |  **Interrupt kernel** Interrupts the kernel, which cancels the currently running operation. The kernel remains active.  | 
|  ![\[The Restart kernel icon.\]](http://docs.aws.amazon.com/sagemaker/latest/dg/images/studio/icons/notebook-restart-kernel.png)  |  **Restart kernel** Restarts the kernel. Variables are reset. Unsaved information is not affected.  | 
|  ![\[The Restart kernel and run all cells icon.\]](http://docs.aws.amazon.com/sagemaker/latest/dg/images/studio/icons/notebook-restart-kernel-run-all-cells.png)  |  **Restart kernel and run all cells** Restarts the kernel, then run all the cells of the notebook.  | 
|  ![\[The Cell type icon.\]](http://docs.aws.amazon.com/sagemaker/latest/dg/images/studio/icons/notebook-cell-type.png)  |  **Cell type** Displays or changes the current cell type. The cell types are: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/sagemaker/latest/dg/notebooks-menu.html)  | 
|  ![\[The Launch terminal icon.\]](http://docs.aws.amazon.com/sagemaker/latest/dg/images/studio/icons/notebook-launch-terminal.png)  |  **Launch terminal** Launches a terminal in the SageMaker image hosting the notebook. For an example, see [Get App Metadata](notebooks-run-and-manage-metadata.md#notebooks-run-and-manage-metadata-app).  | 
|  ![\[The Checkpoint diff icon.\]](http://docs.aws.amazon.com/sagemaker/latest/dg/images/studio/icons/notebook-checkpoint-diff.png)  |  **Checkpoint diff** Opens a new tab that displays the difference between the notebook and the checkpoint file. For more information, see [Get the Difference Between the Last Checkpoint](notebooks-diff.md#notebooks-diff-checkpoint).  | 
|  ![\[The Git diff icon.\]](http://docs.aws.amazon.com/sagemaker/latest/dg/images/studio/icons/notebook-git-diff.png)  |  **Git diff** Only enabled if the notebook is opened from a Git repository. Opens a new tab that displays the difference between the notebook and the last Git commit. For more information, see [Get the Difference Between the Last Commit](notebooks-diff.md#notebooks-diff-git).  | 
|  **2 vCPU \$1 4 GiB**  |  **Instance type** Displays or changes the instance type the notebook runs in. The format is as follows: `number of vCPUs + amount of memory + number of GPUs` `Unknown` indicates the notebook was opened without specifying a kernel. The notebook runs on the SageMaker Studio instance and doesn't accrue runtime charges. You can't assign the notebook to an instance type. You must specify a kernel and then Studio assigns the notebook to a default type. For more information, see [Create or Open an Amazon SageMaker Studio Classic Notebook](notebooks-create-open.md) and [Change the Instance Type for an Amazon SageMaker Studio Classic Notebook](notebooks-run-and-manage-switch-instance-type.md).  | 
|  ![\[The Cluster icon.\]](http://docs.aws.amazon.com/sagemaker/latest/dg/images/studio/icons/notebook-cluster.png)  |  **Cluster** Connect your notebook to an Amazon EMR cluster and scale your ETL jobs or run large-scale model training using Apache Spark, Hive, or Presto. For more information, see [Data preparation using Amazon EMR](studio-notebooks-emr-cluster.md).  | 
|  **Python 3 (Data Science)**  |  **Kernel and SageMaker Image** Displays or changes the kernel that processes the cells in the notebook. The format is as follows: `Kernel (SageMaker Image)` `No Kernel` indicates the notebook was opened without specifying a kernel. You can edit the notebook but you can't run any cells. For more information, see [Change the Image or a Kernel for an Amazon SageMaker Studio Classic Notebook](notebooks-run-and-manage-change-image.md).  | 
|  ![\[The Kernel busy status icon.\]](http://docs.aws.amazon.com/sagemaker/latest/dg/images/studio/icons/notebook-kernel-status.png)  |  **Kernel busy status** Displays the busy status of the kernel. When the edge of the circle and its interior are the same color, the kernel is busy. The kernel is busy when it is starting and when it is processing cells. Additional kernel states are displayed in the status bar at the bottom-left corner of SageMaker Studio.  | 
|  ![\[The Share notebook icon.\]](http://docs.aws.amazon.com/sagemaker/latest/dg/images/studio/icons/notebook-share.png)  |  **Share notebook** Shares the notebook. For more information, see [Share and Use an Amazon SageMaker Studio Classic Notebook](notebooks-sharing.md).  | 

To select multiple cells, click in the left margin outside of a cell. Hold down the `Shift` key and use `K` or the `Up` key to select previous cells, or use `J` or the `Down` key to select following cells.

# Install External Libraries and Kernels in Amazon SageMaker Studio Classic
<a name="studio-notebooks-add-external"></a>

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

Amazon SageMaker Studio Classic notebooks come with multiple images already installed. These images contain kernels and Python packages including scikit-learn, Pandas, NumPy, TensorFlow, PyTorch, and MXNet. You can also install your own images that contain your choice of packages and kernels. For more information on installing your own image, see [Custom Images in Amazon SageMaker Studio Classic](studio-byoi.md).

The different Jupyter kernels in Amazon SageMaker Studio Classic notebooks are separate conda environments. For information about conda environments, see [Managing environments](https://conda.io/docs/user-guide/tasks/manage-environments.html).

## Package installation tools
<a name="studio-notebooks-external-tools"></a>

**Important**  
Currently, all packages in Amazon SageMaker notebooks are licensed for use with Amazon SageMaker AI and do not require additional commercial licenses. However, this might be subject to change in the future, and we recommend reviewing the licensing terms regularly for any updates.

The method that you use to install Python packages from the terminal differs depending on the image. Studio Classic supports the following package installation tools:
+ **Notebooks** – The following commands are supported. If one of the following does not work on your image, try the other one.
  + `%conda install`
  + `%pip install`
+ **The Jupyter terminal** – You can install packages using pip and conda directly. You can also use `apt-get install` to install system packages from the terminal.

**Note**  
We do not recommend using `pip install -u` or `pip install --user`, because those commands install packages on the user's Amazon EFS volume and can potentially block JupyterServer app restarts. Instead, use a lifecycle configuration to reinstall the required packages on app restarts as shown in [Install packages using lifecycle configurations](#nbi-add-external-lcc).

We recommend using `%pip` and `%conda` to install packages from within a notebook because they correctly take into account the active environment or interpreter being used. For more information, see [Add %pip and %conda magic functions](https://github.com/ipython/ipython/pull/11524). You can also use the system command syntax (lines starting with \$1) to install packages. For example, `!pip install` and `!conda install`. 

### Conda
<a name="studio-notebooks-add-external-tools-conda"></a>

Conda is an open source package management system and environment management system that can install packages and their dependencies. SageMaker AI supports using conda with the conda-forge channel. For more information, see [Conda channels](https://docs.conda.io/projects/conda/en/latest/user-guide/concepts/channels.html). The conda-forge channel is a community channel where contributors can upload packages.

**Note**  
Installing packages from conda-forge can take up to 10 minutes. Timing relates to how conda resolves the dependency graph.

All of the SageMaker AI provided environments are functional. User installed packages may not function correctly.

Conda has two methods for activating environments: `conda activate`, and `source activate`. For more information, see [Managing environment](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html).

**Supported conda operations**
+ `conda install` of a package in a single environment
+ `conda install` of a package in all environments
+ Installing a package from the main conda repository
+ Installing a package from conda-forge
+ Changing the conda install location to use Amazon EBS
+ Supporting both `conda activate` and `source activate`

### Pip
<a name="studio-notebooks-add-external-tools-pip"></a>

Pip is the tool for installing and managing Python packages. Pip searches for packages on the Python Package Index (PyPI) by default. Unlike conda, pip doesn't have built in environment support. Therfore, pip isn't as thorough as conda when it comes to packages with native or system library dependencies. Pip can be used to install packages in conda environments. You can use alternative package repositories with pip instead of the PyPI.

**Supported pip operations**
+ Using pip to install a package without an active conda environment
+ Using pip to install a package in a conda environment
+ Using pip to install a package in all conda environments
+ Changing the pip install location to use Amazon EBS
+ Using an alternative repository to install packages with pip

### Unsupported
<a name="studio-notebooks-add-external-tools-misc"></a>

SageMaker AI aims to support as many package installation operations as possible. However, if the packages were installed by SageMaker AI and you use the following operations on these packages, it might make your environment unstable:
+ Uninstalling
+ Downgrading
+ Upgrading

Due to potential issues with network conditions or configurations, or the availability of conda or PyPi, packages may not install in a fixed or deterministic amount of time.

**Note**  
Attempting to install a package in an environment with incompatible dependencies can result in a failure. If issues occur, you can contact the library maintainer about updating the package dependencies. When you modify the environment, such as removing or updating existing packages, this may result in instability of that environment.

## Install packages using lifecycle configurations
<a name="nbi-add-external-lcc"></a>

Install custom images and kernels on the Studio Classic instance's Amazon EBS volume so that they persist when you stop and restart the notebook, and that any external libraries you install are not updated by SageMaker AI. To do that, use a lifecycle configuration that includes both a script that runs when you create the notebook (`on-create)` and a script that runs each time you restart the notebook (`on-start`). For more information about using lifecycle configurations with Studio Classic, see [Use Lifecycle Configurations to Customize Amazon SageMaker Studio Classic](studio-lcc.md). For sample lifecycle configuration scripts, see [SageMaker AI Studio Classic Lifecycle Configuration Samples](https://github.com/aws-samples/sagemaker-studio-lifecycle-config-examples).

# Share and Use an Amazon SageMaker Studio Classic Notebook
<a name="notebooks-sharing"></a>

**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 AI resources](security_iam_id-based-policy-examples.md#grant-tagging-permissions).  
[AWS managed policies for Amazon SageMaker AI](security-iam-awsmanpol.md) that give permissions to create SageMaker resources already include permissions to add tags while creating those resources.

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

You can share your Amazon SageMaker Studio Classic notebooks with your colleagues. The shared notebook is a copy. After you share your notebook, any changes you make to your original notebook aren't reflected in the shared notebook and any changes your colleague's make in their shared copies of the notebook aren't reflected in your original notebook. If you want to share your latest version, you must create a new snapshot and then share it.

**Topics**
+ [Share a Notebook](#notebooks-sharing-share)
+ [Use a Shared Notebook](#notebooks-sharing-using)
+ [Shared spaces and realtime collaboration](#notebooks-sharing-rtc)

## Share a Notebook
<a name="notebooks-sharing-share"></a>

The following screenshot shows the menu from a Studio Classic notebook.

![\[The location of the Share icon in a Studio Classic notebook.\]](http://docs.aws.amazon.com/sagemaker/latest/dg/images/studio/studio-notebook-menu-share.png)


**To share a notebook**

1. In the upper-right corner of the notebook, choose **Share**.

1. (Optional) In **Create shareable snapshot**, choose any of the following items:
   + **Include Git repo information** – Includes a link to the Git repository that contains the notebook. This enables you and your colleague to collaborate and contribute to the same Git repository.
   + **Include output** – Includes all notebook output that has been saved.
**Note**  
If you're an user in IAM Identity Center and you don't see these options, your IAM Identity Center administrator probably disabled the feature. Contact your administrator.

1. Choose **Create**.

1. After the snapshot is created, choose **Copy link** and then choose **Close**.

1. Share the link with your colleague.

After selecting your sharing options, you are provided with a URL. You can share this link with users that have access to Amazon SageMaker Studio Classic. When the user opens the URL, they're prompted to log in using IAM Identity Center or IAM authentication. This shared notebook becomes a copy, so changes made by the recipient will not be reproduced in your original notebook.

## Use a Shared Notebook
<a name="notebooks-sharing-using"></a>

You use a shared notebook in the same way you would with a notebook that you created yourself. You must first login to your account, then open the shared link. If you don't have an active session, you receive an error.

When you choose a link to a shared notebook for the first time, a read-only version of the notebook opens. To edit the shared notebook, choose **Create a Copy**. This copies the shared notebook to your personal storage.

The copied notebook launches on an instance of the instance type and SageMaker image that the notebook was using when the sender shared it. If you aren't currently running an instance of the instance type, a new instance is started. Customization to the SageMaker image isn't shared. You can also inspect the notebook snapshot by choosing **Snapshot Details**.

The following are some important considerations about sharing and authentication:
+ If you have an active session, you see a read-only view of the notebook until you choose **Create a Copy**.
+ If you don't have an active session, you need to log in.
+ If you use IAM to login, after you login, select your user profile then choose **Open Studio Classic**. Then you need to choose the link you were sent.
+ If you use IAM Identity Center to login, after you login the shared notebook is opened automatically in Studio.

## Shared spaces and realtime collaboration
<a name="notebooks-sharing-rtc"></a>

A shared space consists of a shared JupyterServer application and a shared directory. A key benefit of a shared space is that it facilitates collaboration between members of the shared space in real time. Users collaborating in a workspace get access to a shared Studio Classic application where they can access, read, and edit their notebooks in real time. Real time collaboration is only supported for JupyterServer applications within a shared space. Users with access to a shared space can simultaneously open, view, edit, and execute Jupyter notebooks in the shared Studio Classic application in that space. For more information about shared spaced and real time collaboration, see [Collaboration with shared spaces](domain-space.md).

# Get Amazon SageMaker Studio Classic Notebook and App Metadata
<a name="notebooks-run-and-manage-metadata"></a>

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

You can access notebook metadata and App metadata using the Amazon SageMaker Studio Classic UI.

**Topics**
+ [Get Studio Classic Notebook Metadata](#notebooks-run-and-manage-metadata-notebook)
+ [Get App Metadata](#notebooks-run-and-manage-metadata-app)

## Get Studio Classic Notebook Metadata
<a name="notebooks-run-and-manage-metadata-notebook"></a>

Jupyter notebooks contain optional metadata that you can access through the Amazon SageMaker Studio Classic UI.

**To view the notebook metadata:**

1. In the right sidebar, choose the **Property Inspector** icon (![\[Black square icon representing a placeholder or empty image.\]](http://docs.aws.amazon.com/sagemaker/latest/dg/images/studio/icons/gears.png)). 

1. Open the **Advanced Tools** section.

The metadata should look similar to the following.

```
{
    "instance_type": "ml.t3.medium",
    "kernelspec": {
        "display_name": "Python 3 (Data Science)",
        "language": "python",
        "name": "python3__SAGEMAKER_INTERNAL__arn:aws:sagemaker:us-west-2:<acct-id>:image/datascience-1.0"
    },
    "language_info": {
        "codemirror_mode": {
            "name": "ipython",
            "version": 3
        },
        "file_extension": ".py",
        "mimetype": "text/x-python",
        "name": "python",
        "nbconvert_exporter": "python",
        "pygments_lexer": "ipython3",
        "version": "3.7.10"
    }
}
```

## Get App Metadata
<a name="notebooks-run-and-manage-metadata-app"></a>

When you create a notebook in Amazon SageMaker Studio Classic, the App metadata is written to a file named `resource-metadata.json` in the folder `/opt/ml/metadata/`. You can get the App metadata by opening an Image terminal from within the notebook. The metadata gives you the following information, which includes the SageMaker image and instance type the notebook runs in:
+ **AppType** – `KernelGateway` 
+ **DomainId** – Same as the Studio ClassicID
+ **UserProfileName** – The profile name of the current user
+ **ResourceArn** – The Amazon Resource Name (ARN) of the App, which includes the instance type
+ **ResourceName** – The name of the SageMaker image

Additional metadata might be included for internal use by Studio Classic and is subject to change.

**To get the App metadata**

1. In the center of the notebook menu, choose the **Launch Terminal** icon (![\[Dollar sign icon representing currency or financial transactions.\]](http://docs.aws.amazon.com/sagemaker/latest/dg/images/studio/icons/notebook-launch-terminal.png)). This opens a terminal in the SageMaker image that the notebook runs in.

1. Run the following commands to display the contents of the `resource-metadata.json` file.

   ```
   $ cd /opt/ml/metadata/
   cat resource-metadata.json
   ```

   The file should look similar to the following.

   ```
   {
       "AppType": "KernelGateway",
       "DomainId": "d-xxxxxxxxxxxx",
       "UserProfileName": "profile-name",
       "ResourceArn": "arn:aws:sagemaker:us-east-2:account-id:app/d-xxxxxxxxxxxx/profile-name/KernelGateway/datascience--1-0-ml-t3-medium",
       "ResourceName": "datascience--1-0-ml",
       "AppImageVersion":""
   }
   ```

# Get Notebook Differences in Amazon SageMaker Studio Classic
<a name="notebooks-diff"></a>

**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 AI resources](security_iam_id-based-policy-examples.md#grant-tagging-permissions).  
[AWS managed policies for Amazon SageMaker AI](security-iam-awsmanpol.md) that give permissions to create SageMaker resources already include permissions to add tags while creating those resources.

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

You can display the difference between the current notebook and the last checkpoint or the last Git commit using the Amazon SageMaker AI UI.

The following screenshot shows the menu from a Studio Classic notebook.

![\[The location of the relevant menu in a Studio Classic notebook.\]](http://docs.aws.amazon.com/sagemaker/latest/dg/images/studio/studio-notebook-menu-diffs.png)


**Topics**
+ [Get the Difference Between the Last Checkpoint](#notebooks-diff-checkpoint)
+ [Get the Difference Between the Last Commit](#notebooks-diff-git)

## Get the Difference Between the Last Checkpoint
<a name="notebooks-diff-checkpoint"></a>

When you create a notebook, a hidden checkpoint file that matches the notebook is created. You can view changes between the notebook and the checkpoint file or revert the notebook to match the checkpoint file.

By default, a notebook is auto-saved every 120 seconds and also when you close the notebook. However, the checkpoint file isn't updated to match the notebook. To save the notebook and update the checkpoint file to match, you must choose the **Save notebook and create checkpoint** icon ( ![\[Padlock icon representing security or access control in cloud services.\]](http://docs.aws.amazon.com/sagemaker/latest/dg/images/studio/icons/notebook-save-and-checkpoint.png)) on the left of the notebook menu or use the `Ctrl + S` keyboard shortcut.

To view the changes between the notebook and the checkpoint file, choose the **Checkpoint diff** icon (![\[Clock icon representing time or duration in a user interface.\]](http://docs.aws.amazon.com/sagemaker/latest/dg/images/studio/icons/notebook-checkpoint-diff.png)) in the center of the notebook menu.

To revert the notebook to the checkpoint file, from the main Studio Classic menu, choose **File** then **Revert Notebook to Checkpoint**.

## Get the Difference Between the Last Commit
<a name="notebooks-diff-git"></a>

If a notebook is opened from a Git repository, you can view the difference between the notebook and the last Git commit.

To view the changes in the notebook from the last Git commit, choose the **Git diff** icon (![\[Dark button with white text displaying "git" in lowercase letters.\]](http://docs.aws.amazon.com/sagemaker/latest/dg/images/studio/icons/notebook-git-diff.png)) in the center of the notebook menu.

# Manage Resources for Amazon SageMaker Studio Classic Notebooks
<a name="notebooks-run-and-manage"></a>

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

You can change the instance type, and SageMaker image and kernel from within an Amazon SageMaker Studio Classic notebook. To create a custom kernel to use with your notebooks, see [Custom Images in Amazon SageMaker Studio Classic](studio-byoi.md).

**Topics**
+ [Change the Instance Type for an Amazon SageMaker Studio Classic Notebook](notebooks-run-and-manage-switch-instance-type.md)
+ [Change the Image or a Kernel for an Amazon SageMaker Studio Classic Notebook](notebooks-run-and-manage-change-image.md)
+ [Shut Down Resources from Amazon SageMaker Studio Classic](notebooks-run-and-manage-shut-down.md)

# Change the Instance Type for an Amazon SageMaker Studio Classic Notebook
<a name="notebooks-run-and-manage-switch-instance-type"></a>

When you open a new Studio Classic notebook for the first time, you are assigned a default Amazon Elastic Compute Cloud (Amazon EC2) instance type to run the notebook. When you open additional notebooks on the same instance type, the notebooks run on the same instance as the first notebook, even if the notebooks use different kernels. 

You can change the instance type that your Studio Classic notebook runs on from within the notebook. 

The following information only applies to Studio Classic notebooks. For information about how to change the instance type of a Amazon SageMaker notebook instance, see [Update a Notebook Instance](nbi-update.md).

**Important**  
If you change the instance type, unsaved information and existing settings for the notebook are lost, and installed packages must be re-installed.  
The previous instance type continues to run even if no kernel sessions or apps are active. You must explicitly stop the instance to stop accruing charges. To stop the instance, see [Shut down resources](notebooks-run-and-manage-shut-down.md#notebooks-run-and-manage-shut-down-sessions).

The following screenshot shows the menu from a Studio Classic notebook. The processor and memory of the instance type powering the notebook are displayed as **2 vCPU \$1 4 GiB**.

![\[The location of the processor and memory of the instance type for the Studio Classic notebook.\]](http://docs.aws.amazon.com/sagemaker/latest/dg/images/studio/studio-notebook-menu-instance.png)


**To change the instance type**

1. Choose the processor and memory of the instance type powering the notebook. This opens a pop up window.

1. From the **Set up notebook environment** pop up window, select the **Instance type** dropdown menu.

1. From the **Instance type** dropdown, choose one of the instance types that are listed.

1. After choosing a type, choose **Select**.

1. Wait for the new instance to become enabled, and then the new instance type information is displayed.

For a list of the available instance types, see [Instance Types Available for Use With Amazon SageMaker Studio Classic Notebooks](notebooks-available-instance-types.md). 

# Change the Image or a Kernel for an Amazon SageMaker Studio Classic Notebook
<a name="notebooks-run-and-manage-change-image"></a>

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

With Amazon SageMaker Studio Classic notebooks, you can change the notebook's image or kernel from within the notebook.

The following screenshot shows the menu from a Studio Classic notebook. The current SageMaker AI kernel and image are displayed as **Python 3 (Data Science)**, where `Python 3` denotes the kernel and `Data Science` denotes the SageMaker AI image that contains the kernel. The color of the circle to the right indicates the kernel is idle or busy. The kernel is busy when the center and the edge of the circle are the same color.

![\[The location of the current kernel and image in the menu bar from a Studio Classic notebook.\]](http://docs.aws.amazon.com/sagemaker/latest/dg/images/studio/studio-notebook-menu-kernel.png)


**To change a notebook's image or kernel**

1. Choose the image/kernel name in the notebook menu.

1. From the **Set up notebook environment** pop up window, select the **Image** or **Kernel** dropdown menu.

1. From the dropdown menu, choose one of the images or kernels that are listed.

1. After choosing an image or kernel, choose **Select**.

1. Wait for the kernel's status to show as idle, which indicates the kernel has started.

For a list of available SageMaker images and kernels, see [Amazon SageMaker Images Available for Use With Studio Classic Notebooks](notebooks-available-images.md).

# Shut Down Resources from Amazon SageMaker Studio Classic
<a name="notebooks-run-and-manage-shut-down"></a>

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

You can shut down individual Amazon SageMaker AI resources, including notebooks, terminals, kernels, apps, and instances from Studio Classic. You can also shut down all of the resources in one of these categories at the same time. Amazon SageMaker Studio Classic does not support shutting down resources from within a notebook.

**Note**  
When you shut down a Studio Classic notebook instance, additional resources that you created in Studio Classic are not deleted. For example, additional resources can include SageMaker AI endpoints, Amazon EMR clusters, and Amazon S3 buckets. To stop the accrual of charges, you must manually delete these resources. For information about finding resources that are accruing charges, see [Analyzing your costs with AWS Cost Explorer](https://docs.aws.amazon.com/cost-management/latest/userguide/ce-what-is.html).

The following topics demonstrate how to delete these SageMaker AI resources.

**Topics**
+ [Shut down an open notebook](#notebooks-run-and-manage-shut-down-notebook)
+ [Shut down resources](#notebooks-run-and-manage-shut-down-sessions)

## Shut down an open notebook
<a name="notebooks-run-and-manage-shut-down-notebook"></a>

When you shut down a Studio Classic notebook, the notebook is not deleted. The kernel that the notebook is running on is shut down and any unsaved information in the notebook is lost. You can shut down an open notebook from the Studio Classic **File** menu or from the Running Terminal and Kernels pane. The following procedure shows how to shut down an open notebook from the Studio Classic **File** menu.

**To shut down an open notebook from the File menu**

1. Launch Studio Classic by following the steps in [Launch Amazon SageMaker Studio Classic](studio-launch.md).

1. (Optional) Save the notebook contents by choosing **File**, then **Save Notebook**.

1. Choose **File**.

1. Choose **Close and Shutdown Notebook**. This opens a pop-up window.

1. From the pop-up window, choose **OK**.

## Shut down resources
<a name="notebooks-run-and-manage-shut-down-sessions"></a>

You can reach the **Running Terminals and Kernels** pane of Amazon SageMaker Studio Classic by selecting the **Running Terminals and Kernels** icon (![\[Black square icon representing a placeholder or empty image.\]](http://docs.aws.amazon.com/sagemaker/latest/dg/images/studio/icons/running-terminals-kernels.png)). The **Running Terminals and Kernels** pane consists of four sections. Each section lists all the resources of that type. You can shut down each resource individually or shut down all the resources in a section at the same time.

When you choose to shut down all resources in a section, the following occurs:
+ **RUNNING INSTANCES/RUNNING APPS** – All instances, apps, notebooks, kernel sessions, consoles/shells, and image terminals are shut down. System terminals aren't shut down.
+ **KERNEL SESSIONS** – All kernels, notebooks and consoles/shells are shut down.
+ **TERMINAL SESSIONS** – All image terminals and system terminals are shut down.

**To shut down resources**

1. Launch Studio Classic by following the steps in [Launch Amazon SageMaker Studio Classic](studio-launch.md).

1. Choose the **Running Terminals and Kernels** icon.

1. Do either of the following:
   + To shut down a specific resource, choose the **Shut Down** icon on the same row as the resource.

     For running instances, a confirmation dialog box lists all of the resources that SageMaker AI will shut down. A confirmation dialog box displays all running apps. To proceed, choose **Shut down all**.
**Note**  
A confirmation dialog box isn't displayed for kernel sessions or terminal sessions.
   + To shut down all resources in a section, choose the **X** to the right of the section label. A confirmation dialog box is displayed. Choose **Shut down all** to proceed.
**Note**  
When you shut down these Studio Classic resources, any additional resources created from Studio Classic, such as SageMaker AI endpoints, Amazon EMR clusters, and Amazon S3 buckets are not deleted. You must manually delete these resources to stop the accrual of charges. For information about finding resources that are accruing charges, see [Analyzing your costs with AWS Cost Explorer](https://docs.aws.amazon.com/cost-management/latest/userguide/ce-what-is.html).

# Usage Metering for Amazon SageMaker Studio Classic Notebooks
<a name="notebooks-usage-metering"></a>

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

There is no additional charge for using Amazon SageMaker Studio Classic. The costs incurred for running Amazon SageMaker Studio Classic notebooks, interactive shells, consoles, and terminals are based on Amazon Elastic Compute Cloud (Amazon EC2) instance usage.

When you run the following resources, you must choose a SageMaker image and kernel:

**From the Studio Classic Launcher**
+ Notebook
+ Interactive Shell
+ Image Terminal

**From the **File** menu**
+ Notebook
+ Console

When launched, the resource is run on an Amazon EC2 instance of the chosen instance type. If an instance of that type was previously launched and is available, the resource is run on that instance.

For CPU based images, the default suggested instance type is `ml.t3.medium`. For GPU based images, the default suggested instance type is `ml.g4dn.xlarge`.

The costs incurred are based on the instance type. You are billed separately for each instance.

Metering starts when an instance is created. Metering ends when all the apps on the instance are shut down, or the instance is shut down. For information about how to shut down an instance, see [Shut Down Resources from Amazon SageMaker Studio Classic](notebooks-run-and-manage-shut-down.md).

**Important**  
You must shut down the instance to stop incurring charges. If you shut down the notebook running on the instance but don't shut down the instance, you will still incur charges. When you shut down the Studio Classic notebook instances, any additional resources, such as SageMaker AI endpoints, Amazon EMR clusters, and Amazon S3 buckets created from Studio Classic are not deleted. Delete those resources to stop accrual of charges.

When you open multiple notebooks on the same instance type, the notebooks run on the same instance even if they are using different kernels. You are billed only for the time that one instance is running.

You can change the instance type from within the notebook after you open it. For more information, see [Change the Instance Type for an Amazon SageMaker Studio Classic Notebook](notebooks-run-and-manage-switch-instance-type.md).

For information about billing along with pricing examples, see [Amazon SageMaker Pricing](https://aws.amazon.com/sagemaker/pricing/).

# Available Resources for Amazon SageMaker Studio Classic Notebooks
<a name="notebooks-resources"></a>

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

The following sections list the available resources for Amazon SageMaker Studio Classic notebooks.

**Topics**
+ [Instance Types Available for Use With Amazon SageMaker Studio Classic Notebooks](notebooks-available-instance-types.md)
+ [Amazon SageMaker Images Available for Use With Studio Classic Notebooks](notebooks-available-images.md)

# Instance Types Available for Use With Amazon SageMaker Studio Classic Notebooks
<a name="notebooks-available-instance-types"></a>

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

Amazon SageMaker Studio Classic notebooks run on Amazon Elastic Compute Cloud (Amazon EC2) instances. The following Amazon EC2 instance types are available for use with Studio Classic notebooks. For detailed information on which instance types fit your use case, and their performance capabilities, see [Amazon Elastic Compute Cloud Instance types](https://aws.amazon.com/ec2/instance-types/). For information about pricing for these instance types, see [Amazon EC2 Pricing](https://aws.amazon.com/ec2/pricing/).

For information about available Amazon SageMaker Notebook Instance types, see [CreateNotebookInstance](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateNotebookInstance.html#sagemaker-CreateNotebookInstance-request-InstanceType).

**Note**  
For most use cases, you should use a `ml.t3.medium`. This is the default instance type for CPU-based SageMaker images, and is available as part of the [AWS Free Tier](https://aws.amazon.com/free).

**Topics**
+ [CPU instances](#notebooks-resources-no-gpu)
+ [Instances with 1 or more GPUs](#notebooks-resources-gpu)

## CPU instances
<a name="notebooks-resources-no-gpu"></a>

The following table lists the Amazon EC2 CPU instance types with no GPU attached that are available for use with Studio Classic notebooks. It also lists information about the specifications of each instance type. The default instance type for CPU-based images is `ml.t3.medium`. 

For detailed information on which instance types fit your use case, and their performance capabilities, see [Amazon Elastic Compute Cloud Instance types](https://aws.amazon.com/ec2/instance-types/). For information about pricing for these instance types, see [Amazon EC2 Pricing](https://aws.amazon.com/ec2/pricing/).

CPU instances


| Instance | Use case | Fast launch | vCPU | Memory (GiB) | Instance Storage (GB) | 
| --- | --- | --- | --- | --- | --- | 
| ml.t3.medium | General purpose | Yes | 2 | 4 | Amazon EBS Only | 
| ml.t3.large | General purpose | No | 2 | 8 | Amazon EBS Only | 
| ml.t3.xlarge | General purpose | No | 4 | 16 | Amazon EBS Only | 
| ml.t3.2xlarge | General purpose | No | 8 | 32 | Amazon EBS Only | 
| ml.m5.large | General purpose | Yes | 2 | 8 | Amazon EBS Only | 
| ml.m5.xlarge | General purpose | No | 4 | 16 | Amazon EBS Only | 
| ml.m5.2xlarge | General purpose | No | 8 | 32 | Amazon EBS Only | 
| ml.m5.4xlarge | General purpose | No | 16 | 64 | Amazon EBS Only | 
| ml.m5.8xlarge | General purpose | No | 32 | 128 | Amazon EBS Only | 
| ml.m5.12xlarge | General purpose | No | 48 | 192 | Amazon EBS Only | 
| ml.m5.16xlarge | General purpose | No | 64 | 256 | Amazon EBS Only | 
| ml.m5.24xlarge | General purpose | No | 96 | 384 | Amazon EBS Only | 
| ml.m5d.large | General purpose | No | 2 | 8 | 1 x 75 NVMe SSD | 
| ml.m5d.xlarge | General purpose | No | 4 | 16 | 1 x 150 NVMe SSD | 
| ml.m5d.2xlarge | General purpose | No | 8 | 32 | 1 x 300 NVMe SSD | 
| ml.m5d.4xlarge | General purpose | No | 16 | 64 | 2 x 300 NVMe SSD | 
| ml.m5d.8xlarge | General purpose | No | 32 | 128 | 2 x 600 NVMe SSD | 
| ml.m5d.12xlarge | General purpose | No | 48 | 192 | 2 x 900 NVMe SSD | 
| ml.m5d.16xlarge | General purpose | No | 64 | 256 | 4 x 600 NVMe SSD | 
| ml.m5d.24xlarge | General purpose | No | 96 | 384 | 4 x 900 NVMe SSD | 
| ml.c5.large | Compute optimized | Yes | 2 | 4 | Amazon EBS Only | 
| ml.c5.xlarge | Compute optimized | No | 4 | 8 | Amazon EBS Only | 
| ml.c5.2xlarge | Compute optimized | No | 8 | 16 | Amazon EBS Only | 
| ml.c5.4xlarge | Compute optimized | No | 16 | 32 | Amazon EBS Only | 
| ml.c5.9xlarge | Compute optimized | No | 36 | 72 | Amazon EBS Only | 
| ml.c5.12xlarge | Compute optimized | No | 48 | 96 | Amazon EBS Only | 
| ml.c5.18xlarge | Compute optimized | No | 72 | 144 | Amazon EBS Only | 
| ml.c5.24xlarge | Compute optimized | No | 96 | 192 | Amazon EBS Only | 
| ml.r5.large | Memory optimized | No | 2 | 16 | Amazon EBS Only | 
| ml.r5.xlarge | Memory optimized | No | 4 | 32 | Amazon EBS Only | 
| ml.r5.2xlarge | Memory optimized | No | 8 | 64 | Amazon EBS Only | 
| ml.r5.4xlarge | Memory optimized | No | 16 | 128 | Amazon EBS Only | 
| ml.r5.8xlarge | Memory optimized | No | 32 | 256 | Amazon EBS Only | 
| ml.r5.12xlarge | Memory optimized | No | 48 | 384 | Amazon EBS Only | 
| ml.r5.16xlarge | Memory optimized | No | 64 | 512 | Amazon EBS Only | 
| ml.r5.24xlarge | Memory optimized | No | 96 | 768 | Amazon EBS Only | 

## Instances with 1 or more GPUs
<a name="notebooks-resources-gpu"></a>

The following table lists the Amazon EC2 instance types with 1 or more GPUs attached that are available for use with Studio Classic notebooks. It also lists information about the specifications of each instance type. The default instance type for GPU-based images is `ml.g4dn.xlarge`. 

For detailed information on which instance types fit your use case, and their performance capabilities, see [Amazon Elastic Compute Cloud Instance types](https://aws.amazon.com/ec2/instance-types/). For information about pricing for these instance types, see [Amazon EC2 Pricing](https://aws.amazon.com/ec2/pricing/).

Instances with 1 or more GPUs


| Instance | Use case | Fast launch | GPUs | vCPU | Memory (GiB) | GPU Memory (GiB) | Instance Storage (GB) | 
| --- | --- | --- | --- | --- | --- | --- | --- | 
| ml.p3.2xlarge | Accelerated computing | No | 1 | 8 | 61 | 16 | Amazon EBS Only | 
| ml.p3.8xlarge | Accelerated computing | No | 4 | 32 | 244 | 64 | Amazon EBS Only | 
| ml.p3.16xlarge | Accelerated computing | No | 8 | 64 | 488 | 128 | Amazon EBS Only | 
| ml.p3dn.24xlarge | Accelerated computing | No | 8 | 96 | 768 | 256 | 2 x 900 NVMe SSD | 
| ml.p4d.24xlarge | Accelerated computing | No | 8 | 96 | 1152 | 320 GB HBM2 | 8 x 1000 NVMe SSD | 
| ml.p4de.24xlarge | Accelerated computing | No | 8 | 96 | 1152 | 640 GB HBM2e | 8 x 1000 NVMe SSD | 
| ml.g4dn.xlarge | Accelerated computing | Yes | 1 | 4 | 16 | 16 | 1 x 125 NVMe SSD | 
| ml.g4dn.2xlarge | Accelerated computing | No | 1 | 8 | 32 | 16 | 1 x 225 NVMe SSD | 
| ml.g4dn.4xlarge | Accelerated computing | No | 1 | 16 | 64 | 16 | 1 x 225 NVMe SSD | 
| ml.g4dn.8xlarge | Accelerated computing | No | 1 | 32 | 128 | 16 | 1 x 900 NVMe SSD | 
| ml.g4dn.12xlarge | Accelerated computing | No | 4 | 48 | 192 | 64 | 1 x 900 NVMe SSD | 
| ml.g4dn.16xlarge | Accelerated computing | No | 1 | 64 | 256 | 16 | 1 x 900 NVMe SSD | 
| ml.g5.xlarge | Accelerated computing | No | 1 | 4 | 16 | 24 | 1 x 250 NVMe SSD | 
| ml.g5.2xlarge | Accelerated computing | No | 1 | 8 | 32 | 24 | 1 x 450 NVMe SSD | 
| ml.g5.4xlarge | Accelerated computing | No | 1 | 16 | 64 | 24 | 1 x 600 NVMe SSD | 
| ml.g5.8xlarge | Accelerated computing | No | 1 | 32 | 128 | 24 | 1 x 900 NVMe SSD | 
| ml.g5.12xlarge | Accelerated computing | No | 4 | 48 | 192 | 96 | 1 x 3800 NVMe SSD | 
| ml.g5.16xlarge | Accelerated computing | No | 1 | 64 | 256 | 24 | 1 x 1900 NVMe SSD | 
| ml.g5.24xlarge | Accelerated computing | No | 4 | 96 | 384 | 96 | 1 x 3800 NVMe SSD | 
| ml.g5.48xlarge | Accelerated computing | No | 8 | 192 | 768 | 192 | 2 x 3800 NVMe SSD | 

# Amazon SageMaker Images Available for Use With Studio Classic Notebooks
<a name="notebooks-available-images"></a>

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

This page lists the SageMaker images and associated kernels that are available in Amazon SageMaker Studio Classic. This page also gives information about the format needed to create the ARN for each image. SageMaker images contain the latest [Amazon SageMaker Python SDK](https://sagemaker.readthedocs.io/en/stable) and the latest version of the kernel. For more information, see [Deep Learning Containers Images](https://docs.aws.amazon.com/deep-learning-containers/latest/devguide/deep-learning-containers-images.html).

**Topics**
+ [Image ARN format](#notebooks-available-images-arn)
+ [Supported URI tags](#notebooks-available-uri-tag)
+ [Supported images](#notebooks-available-images-supported)
+ [Images slated for deprecation](#notebooks-available-images-deprecation)
+ [Deprecated images](#notebooks-available-images-deprecated)

## Image ARN format
<a name="notebooks-available-images-arn"></a>

The following table lists the image ARN and URI format for each Region. To create the full ARN for an image, replace the *resource-identifier* placeholder with the corresponding resource identifier for the image. The resource identifier is found in the SageMaker images and kernels table. To create the full URI for an image, replace the *tag* placeholder with the corresponding cpu or gpu tag. For the list of tags you can use, see [Supported URI tags](#notebooks-available-uri-tag).

**Note**  
SageMaker Distribution images use a distinct set of image ARNs, which are listed in the following table.


| Region | Image ARN Format | SageMaker Distribution Image ARN Format | SageMaker Distribution Image URI Format | 
| --- | --- | --- | --- | 
|  us-east-1  | arn:aws:sagemaker:us-east-1:081325390199:image/resource-identifier | arn:aws:sagemaker:us-east-1:885854791233:image/resource-identifier | 885854791233.dkr.ecr.us-east-1.amazonaws.com/sagemaker-distribution-prod:tag | 
|  us-east-2  | arn:aws:sagemaker:us-east-2:429704687514:image/resource-identifier | arn:aws:sagemaker:us-east-2:137914896644:image/resource-identifier | 137914896644.dkr.ecr.us-east-2.amazonaws.com/sagemaker-distribution-prod:tag | 
|  us-west-1  | arn:aws:sagemaker:us-west-1:742091327244:image/resource-identifier | arn:aws:sagemaker:us-west-1:053634841547:image/resource-identifier | 053634841547.dkr.ecr.us-west-1.amazonaws.com/sagemaker-distribution-prod:tag | 
|  us-west-2  | arn:aws:sagemaker:us-west-2:236514542706:image/resource-identifier | arn:aws:sagemaker:us-west-2:542918446943:image/resource-identifier | 542918446943.dkr.ecr.us-west-2.amazonaws.com/sagemaker-distribution-prod:tag | 
|  af-south-1  | arn:aws:sagemaker:af-south-1:559312083959:image/resource-identifier | arn:aws:sagemaker:af-south-1:238384257742:image/resource-identifier | 238384257742.dkr.ecr.af-south-1.amazonaws.com/sagemaker-distribution-prod:tag | 
|  ap-east-1  | arn:aws:sagemaker:ap-east-1:493642496378:image/resource-identifier | arn:aws:sagemaker:ap-east-1:523751269255:image/resource-identifier | 523751269255.dkr.ecr.ap-east-1.amazonaws.com/sagemaker-distribution-prod:tag | 
|  ap-south-1  | arn:aws:sagemaker:ap-south-1:394103062818:image/resource-identifier | arn:aws:sagemaker:ap-south-1:245090515133:image/resource-identifier | 245090515133.dkr.ecr.ap-south-1.amazonaws.com/sagemaker-distribution-prod:tag | 
|  ap-northeast-2  | arn:aws:sagemaker:ap-northeast-2:806072073708:image/resource-identifier | arn:aws:sagemaker:ap-northeast-2:064688005998:image/resource-identifier | 064688005998.dkr.ecr.ap-northeast-2.amazonaws.com/sagemaker-distribution-prod:tag | 
|  ap-southeast-1  | arn:aws:sagemaker:ap-southeast-1:492261229750:image/resource-identifier | arn:aws:sagemaker:ap-southeast-1:022667117163:image/resource-identifier | 022667117163.dkr.ecr.ap-southeast-1.amazonaws.com/sagemaker-distribution-prod:tag | 
|  ap-southeast-2  | arn:aws:sagemaker:ap-southeast-2:452832661640:image/resource-identifier | arn:aws:sagemaker:ap-southeast-2:648430277019:image/resource-identifier | 648430277019.dkr.ecr.ap-southeast-2.amazonaws.com/sagemaker-distribution-prod:tag | 
|  ap-northeast-1  |  arn:aws:sagemaker:ap-northeast-1:102112518831:image/resource-identifier |  arn:aws:sagemaker:ap-northeast-1:010972774902:image/resource-identifier | 010972774902.dkr.ecr.ap-northeast-1.amazonaws.com/sagemaker-distribution-prod:tag | 
|  ca-central-1  | arn:aws:sagemaker:ca-central-1:310906938811:image/resource-identifier | arn:aws:sagemaker:ca-central-1:481561238223:image/resource-identifier | 481561238223.dkr.ecr.ca-central-1.amazonaws.com/sagemaker-distribution-prod:tag | 
|  eu-central-1  | arn:aws:sagemaker:eu-central-1:936697816551:image/resource-identifier | arn:aws:sagemaker:eu-central-1:545423591354:image/resource-identifier | 545423591354.dkr.ecr.eu-central-1.amazonaws.com/sagemaker-distribution-prod:tag | 
|  eu-west-1  | arn:aws:sagemaker:eu-west-1:470317259841:image/resource-identifier | arn:aws:sagemaker:eu-west-1:819792524951:image/resource-identifier | 819792524951.dkr.ecr.eu-west-1.amazonaws.com/sagemaker-distribution-prod:tag | 
|  eu-west-2  | arn:aws:sagemaker:eu-west-2:712779665605:image/resource-identifier | arn:aws:sagemaker:eu-west-2:021081402939:image/resource-identifier | 021081402939.dkr.ecr.eu-west-2.amazonaws.com/sagemaker-distribution-prod:tag | 
|  eu-west-3  | arn:aws:sagemaker:eu-west-3:615547856133:image/resource-identifier | arn:aws:sagemaker:eu-west-3:856416204555:image/resource-identifier | 856416204555.dkr.ecr.eu-west-3.amazonaws.com/sagemaker-distribution-prod:tag | 
|  eu-north-1  | arn:aws:sagemaker:eu-north-1:243637512696:image/resource-identifier | arn:aws:sagemaker:eu-north-1:175620155138:image/resource-identifier | 175620155138.dkr.ecr.eu-north-1.amazonaws.com/sagemaker-distribution-prod:tag | 
|  eu-south-1  | arn:aws:sagemaker:eu-south-1:592751261982:image/resource-identifier | arn:aws:sagemaker:eu-south-1:810671768855:image/resource-identifier | 810671768855.dkr.ecr.eu-south-1.amazonaws.com/sagemaker-distribution-prod:tag | 
|  sa-east-1  | arn:aws:sagemaker:sa-east-1:782484402741:image/resource-identifier | arn:aws:sagemaker:sa-east-1:567556641782:image/resource-identifier | 567556641782.dkr.ecr.sa-east-1.amazonaws.com/sagemaker-distribution-prod:tag | 
|  ap-northeast-3  | arn:aws:sagemaker:ap-northeast-3:792733760839:image/resource-identifier | arn:aws:sagemaker:ap-northeast-3:564864627153:image/resource-identifier | 564864627153.dkr.ecr.ap-northeast-3.amazonaws.com/sagemaker-distribution-prod:tag | 
|  ap-southeast-3  | arn:aws:sagemaker:ap-southeast-3:276181064229:image/resource-identifier | arn:aws:sagemaker:ap-southeast-3:370607712162:image/resource-identifier | 370607712162.dkr.ecr.ap-southeast-3.amazonaws.com/sagemaker-distribution-prod:tag | 
|  me-south-1  | arn:aws:sagemaker:me-south-1:117516905037:image/resource-identifier | arn:aws:sagemaker:me-south-1:523774347010:image/resource-identifier | 523774347010.dkr.ecr.me-south-1.amazonaws.com/sagemaker-distribution-prod:tag | 
|  me-central-1  | arn:aws:sagemaker:me-central-1:103105715889:image/resource-identifier | arn:aws:sagemaker:me-central-1:358593528301:image/resource-identifier | 358593528301.dkr.ecr.me-central-1.amazonaws.com/sagemaker-distribution-prod:tag | 

## Supported URI tags
<a name="notebooks-available-uri-tag"></a>

The following list shows the tags you can include in your image URI.
+ 1-cpu
+ 1-gpu
+ 0-cpu
+ 0-gpu

**The following examples show URIs with various tag formats:**
+ 542918446943.dkr.ecr.us-west-2.amazonaws.com/sagemaker-distribution-prod:1-cpu
+ 542918446943.dkr.ecr.us-west-2.amazonaws.com/sagemaker-distribution-prod:0-gpu

## Supported images
<a name="notebooks-available-images-supported"></a>

The following table gives information about the SageMaker images and associated kernels that are available in Amazon SageMaker Studio Classic. It also gives information about the resource identifier and Python version included in the image.

SageMaker images and kernels


| SageMaker Image | Description | Resource Identifier | Kernels (and Identifier) | Python Version | 
| --- | --- | --- | --- | --- | 
| Base Python 4.3 | Official Python 3.11 image from DockerHub with boto3 and AWS CLI included. | sagemaker-base-python-v4 | Python 3 (python3) | Python 3.11 | 
| Base Python 4.2 | Official Python 3.11 image from DockerHub with boto3 and AWS CLI included. | sagemaker-base-python-v4 | Python 3 (python3) | Python 3.11 | 
| Base Python 4.1 | Official Python 3.11 image from DockerHub with boto3 and AWS CLI included. | sagemaker-base-python-v4 | Python 3 (python3) | Python 3.11 | 
| Base Python 4.0 | Official Python 3.11 image from DockerHub with boto3 and AWS CLI included. | sagemaker-base-python-v4 | Python 3 (python3) | Python 3.11 | 
| Base Python 3.0 | Official Python 3.10 image from DockerHub with boto3 and AWS CLI included. | sagemaker-base-python-310-v1 | Python 3 (python3) | Python 3.10 | 
| Data Science 5.3 | Data Science 5.3 is a Python 3.11 [conda](https://docs.conda.io/projects/conda/en/latest/index.html) image based on Ubuntu version jammy-20240212. It includes the most commonly used Python packages and libraries, such as NumPy and SciKit Learn. | sagemaker-data-science-v5 | Python 3 (python3) | Python 3.11 | 
| Data Science 5.2 | Data Science 5.2 is a Python 3.11 [conda](https://docs.conda.io/projects/conda/en/latest/index.html) image based on Ubuntu version jammy-20240212. It includes the most commonly used Python packages and libraries, such as NumPy and SciKit Learn. | sagemaker-data-science-v5 | Python 3 (python3) | Python 3.11 | 
| Data Science 5.1 | Data Science 5.1 is a Python 3.11 [conda](https://docs.conda.io/projects/conda/en/latest/index.html) image based on Ubuntu version jammy-20240212. It includes the most commonly used Python packages and libraries, such as NumPy and SciKit Learn. | sagemaker-data-science-v5 | Python 3 (python3) | Python 3.11 | 
| Data Science 5.0 | Data Science 5.0 is a Python 3.11 [conda](https://docs.conda.io/projects/conda/en/latest/index.html) image based on Ubuntu version jammy-20240212. It includes the most commonly used Python packages and libraries, such as NumPy and SciKit Learn. | sagemaker-data-science-v5 | Python 3 (python3) | Python 3.11 | 
| Data Science 4.0 | Data Science 4.0 is a Python 3.11 [conda](https://docs.conda.io/projects/conda/en/latest/index.html) image based on Ubuntu version 22.04. It includes the most commonly used Python packages and libraries, such as NumPy and SciKit Learn. | sagemaker-data-science-311-v1 | Python 3 (python3) | Python 3.11 | 
| Data Science 3.0 | Data Science 3.0 is a Python 3.10 [conda](https://docs.conda.io/projects/conda/en/latest/index.html) image based on Ubuntu version 22.04. It includes the most commonly used Python packages and libraries, such as NumPy and SciKit Learn. | sagemaker-data-science-310-v1 | Python 3 (python3) | Python 3.10 | 
| Geospatial 1.0 | Amazon SageMaker geospatial is a Python image consisting of commonly used geospatial libraries such as GDAL, Fiona, GeoPandas, Shapley, and Rasterio. It allows you to visualize geospatial data within SageMaker AI. For more information, see [Amazon SageMaker geospatial Notebook SDK](https://docs.aws.amazon.com/sagemaker/latest/dg/geospatial-notebook-sdk.html) | sagemaker-geospatial-1.0 | Python 3 (python3) | Python 3.10 | 
| SparkAnalytics 4.3 | The SparkAnalytics 4.3 image provides Spark and PySpark kernel options on Amazon SageMaker Studio Classic, including SparkMagic Spark, SparkMagic PySpark, Glue Spark, and Glue PySpark, enabling flexible distributed data processing. | sagemaker-spark-analytics-v4 |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/sagemaker/latest/dg/notebooks-available-images.html)  | Python 3.11 | 
| SparkAnalytics 4.2 | The SparkAnalytics 4.2 image provides Spark and PySpark kernel options on Amazon SageMaker Studio Classic, including SparkMagic Spark, SparkMagic PySpark, Glue Spark, and Glue PySpark, enabling flexible distributed data processing. | sagemaker-spark-analytics-v4 |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/sagemaker/latest/dg/notebooks-available-images.html)  | Python 3.11 | 
| SparkAnalytics 4.1 | The SparkAnalytics 4.1 image provides Spark and PySpark kernel options on Amazon SageMaker Studio Classic, including SparkMagic Spark, SparkMagic PySpark, Glue Spark, and Glue PySpark, enabling flexible distributed data processing. | sagemaker-spark-analytics-v4 |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/sagemaker/latest/dg/notebooks-available-images.html)  | Python 3.11 | 
| SparkAnalytics 4.0 | The SparkAnalytics 4.0 image provides Spark and PySpark kernel options on Amazon SageMaker Studio Classic, including SparkMagic Spark, SparkMagic PySpark, Glue Spark, and Glue PySpark, enabling flexible distributed data processing. | sagemaker-spark-analytics-v4 |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/sagemaker/latest/dg/notebooks-available-images.html)  | Python 3.11 | 
| SparkAnalytics 3.0 | The SparkAnalytics 3.0 image provides Spark and PySpark kernel options on Amazon SageMaker Studio Classic, including SparkMagic Spark, SparkMagic PySpark, Glue Spark, and Glue PySpark, enabling flexible distributed data processing. | sagemaker-sparkanalytics-311-v1 | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/sagemaker/latest/dg/notebooks-available-images.html) | Python 3.11 | 
| SparkAnalytics 2.0 | Anaconda Individual Edition with PySpark and Spark kernels. For more information, see [sparkmagic](https://github.com/jupyter-incubator/sparkmagic). | sagemaker-sparkanalytics-310-v1 | [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/sagemaker/latest/dg/notebooks-available-images.html) | Python 3.10 | 
| PyTorch 2.4.0 Python 3.11 CPU Optimized | The AWS Deep Learning Containers for PyTorch 2.4.0 with CUDA 12.4 include containers for training on CPU, optimized for performance and scale on AWS. For more information, see [Release Notes for Deep Learning Containers](https://docs.aws.amazon.com/deep-learning-containers/latest/devguide/dlc-release-notes.html). | pytorch-2.4.0-cpu-py311 | Python 3 (python3) | Python 3.11 | 
| PyTorch 2.4.0 Python 3.11 GPU Optimized | The AWS Deep Learning Containers for PyTorch 2.4.0 with CUDA 12.4 include containers for training on GPU, optimized for performance and scale on AWS. For more information, see [Release Notes for Deep Learning Containers](https://docs.aws.amazon.com/deep-learning-containers/latest/devguide/dlc-release-notes.html). | pytorch-2.4.0-gpu-py311 | Python 3 (python3) | Python 3.11 | 
| PyTorch 2.3.0 Python 3.11 CPU Optimized | The AWS Deep Learning Containers for PyTorch 2.3.0 with CUDA 12.1 include containers for training on CPU, optimized for performance and scale on AWS. For more information, see [Release Notes for Deep Learning Containers](https://docs.aws.amazon.com/deep-learning-containers/latest/devguide/dlc-release-notes.html). | pytorch-2.3.0-cpu-py311 | Python 3 (python3) | Python 3.11 | 
| PyTorch 2.3.0 Python 3.11 GPU Optimized | The AWS Deep Learning Containers for PyTorch 2.3.0 with CUDA 12.1 include containers for training on GPU, optimized for performance and scale on AWS. For more information, see [Release Notes for Deep Learning Containers](https://docs.aws.amazon.com/deep-learning-containers/latest/devguide/dlc-release-notes.html). | pytorch-2.3.0-gpu-py311 | Python 3 (python3) | Python 3.11 | 
| PyTorch 2.2.0 Python 3.10 CPU Optimized | The AWS Deep Learning Containers for PyTorch 2.2 with CUDA 12.1 include containers for training on CPU, optimized for performance and scale on AWS. For more information, see [Release Notes for Deep Learning Containers](https://docs.aws.amazon.com/deep-learning-containers/latest/devguide/dlc-release-notes.html). | pytorch-2.2.0-cpu-py310 | Python 3 (python3) | Python 3.10 | 
| PyTorch 2.2.0 Python 3.10 GPU Optimized | The AWS Deep Learning Containers for PyTorch 2.2 with CUDA 12.1 include containers for training on GPU, optimized for performance and scale on AWS. For more information, see [Release Notes for Deep Learning Containers](https://docs.aws.amazon.com/deep-learning-containers/latest/devguide/dlc-release-notes.html). | pytorch-2.2.0-gpu-py310 | Python 3 (python3) | Python 3.10 | 
| PyTorch 2.1.0 Python 3.10 CPU Optimized | The AWS Deep Learning Containers for PyTorch 2.1 with CUDA 12.1 include containers for training on CPU, optimized for performance and scale on AWS. For more information, see [Release Notes for Deep Learning Containers](https://docs.aws.amazon.com/deep-learning-containers/latest/devguide/dlc-release-notes.html). | pytorch-2.1.0-cpu-py310 | Python 3 (python3) | Python 3.10 | 
| PyTorch 2.1.0 Python 3.10 GPU Optimized | The AWS Deep Learning Containers for PyTorch 2.1 with CUDA 12.1 include containers for training on GPU, optimized for performance and scale on AWS. For more information, see [Release Notes for Deep Learning Containers](https://docs.aws.amazon.com/deep-learning-containers/latest/devguide/dlc-release-notes.html). | pytorch-2.1.0-gpu-py310 | Python 3 (python3) | Python 3.10 | 
| PyTorch 1.13 HuggingFace Python 3.10 Neuron Optimized | PyTorch 1.13 image with HuggingFace and Neuron packages installed for training on Trainium instances optimized for performance and scale on AWS. | pytorch-1.13-hf-neuron-py310 | Python 3 (python3) | Python 3.10 | 
| PyTorch 1.13 Python 3.10 Neuron Optimized | PyTorch 1.13 image with Neuron packages installed for training on Trainium instances optimized for performance and scale on AWS. | pytorch-1.13-neuron-py310 | Python 3 (python3) | Python 3.10 | 
| TensorFlow 2.14.0 Python 3.10 CPU Optimized | The AWS Deep Learning Containers for TensorFlow 2.14 with CUDA 11.8 include containers for training on CPU, optimized for performance and scale on AWS. For more information, see [Release Notes for Deep Learning Containers](https://docs.aws.amazon.com/deep-learning-containers/latest/devguide/dlc-release-notes.html). | tensorflow-2.14.1-cpu-py310-ubuntu20.04-sagemaker-v1.0 | Python 3 (python3) | Python 3.10 | 
| TensorFlow 2.14.0 Python 3.10 GPU Optimized | The AWS Deep Learning Containers for TensorFlow 2.14 with CUDA 11.8 include containers for training on GPU, optimized for performance and scale on AWS. For more information, see [Release Notes for Deep Learning Containers](https://docs.aws.amazon.com/deep-learning-containers/latest/devguide/dlc-release-notes.html). | tensorflow-2.14.1-gpu-py310-cu118-ubuntu20.04-sagemaker-v1.0 | Python 3 (python3) | Python 3.10 | 

## Images slated for deprecation
<a name="notebooks-available-images-deprecation"></a>

SageMaker AI ends support for images the day after any of the packages in the image reach end-of life by their publisher. The following SageMaker images are slated for deprecation. 

Images based on Python 3.8 reached [end-of-life](https://endoflife.date/python) on October 31st, 2024. Starting on November 1, 2024, SageMaker AI will discontinue support for these images and they will not be selectable from the Studio Classic UI. To avoid non-compliance issues, if you're using any of these images, we recommend that you move to an image with a later version.

SageMaker images slated for deprecation


| SageMaker Image | Deprecation date | Description | Resource Identifier | Kernels | Python Version | 
| --- | --- | --- | --- | --- | --- | 
| SageMaker Distribution v0.12 CPU | November 1, 2024 | SageMaker Distribution v0 CPU is a Python 3.8 image that includes popular frameworks for machine learning, data science and visualization on CPU. This includes deep learning frameworks like PyTorch, TensorFlow and Keras; popular Python packages like numpy, scikit-learn and pandas; and IDEs like Jupyter Lab. For more information, see the [Amazon SageMaker AI Distribution](https://github.com/aws/sagemaker-distribution) repo.  | sagemaker-distribution-cpu-v0 | Python 3 (python3) | Python 3.8 | 
| SageMaker Distribution v0.12 GPU | November 1, 2024 | SageMaker Distribution v0 GPU is a Python 3.8 image that includes popular frameworks for machine learning, data science and visualization on GPU. This includes deep learning frameworks like PyTorch, TensorFlow and Keras; popular Python packages like numpy, scikit-learn and pandas; and IDEs like Jupyter Lab. For more information, see the [Amazon SageMaker AI Distribution](https://github.com/aws/sagemaker-distribution) repo.  | sagemaker-distribution-gpu-v0 | Python 3 (python3) | Python 3.8 | 
| Base Python 2.0 | November 1, 2024 | Official Python 3.8 image from DockerHub with boto3 and AWS CLI included. | sagemaker-base-python-38 | Python 3 (python3) | Python 3.8 | 
| Data Science 2.0 | November 1, 2024 | Data Science 2.0 is a Python 3.8 [conda](https://docs.conda.io/projects/conda/en/latest/index.html) image based on Ubuntu version 22.04. It includes the most commonly used Python packages and libraries, such as NumPy and SciKit Learn. | sagemaker-data-science-38 | Python 3 (python3) | Python 3.8 | 
| PyTorch 1.13 Python 3.9 CPU Optimized | November 1, 2024 | The AWS Deep Learning Containers for PyTorch 1.13 with CUDA 11.3 include containers for training on CPU, optimized for performance and scale on AWS. For more information, see [Release Notes for Deep Learning Containers](https://docs.aws.amazon.com/deep-learning-containers/latest/devguide/dlc-release-notes.html). | pytorch-1.13-cpu-py39 | Python 3 (python3) | Python 3.9 | 
| PyTorch 1.13 Python 3.9 GPU Optimized | November 1, 2024 | The AWS Deep Learning Containers for PyTorch 1.13 with CUDA 11.7 include containers for training on GPU, optimized for performance and scale on AWS. For more information, see [Release Notes for Deep Learning Containers](https://docs.aws.amazon.com/deep-learning-containers/latest/devguide/dlc-release-notes.html). | pytorch-1.13-gpu-py39 | Python 3 (python3) | Python 3.9 | 
| PyTorch 1.12 Python 3.8 CPU Optimized | November 1, 2024 | The AWS Deep Learning Containers for PyTorch 1.12 with CUDA 11.3 include containers for training on CPU, optimized for performance and scale on AWS. For more information, see [AWS Deep Learning Containers for PyTorch 1.12.0](https://aws.amazon.com/releasenotes/aws-deep-learning-containers-for-pytorch-1-12-0-on-sagemaker/). | pytorch-1.12-cpu-py38 | Python 3 (python3) | Python 3.8 | 
| PyTorch 1.12 Python 3.8 GPU Optimized | November 1, 2024 | The AWS Deep Learning Containers for PyTorch 1.12 with CUDA 11.3 include containers for training on GPU, optimized for performance and scale on AWS. For more information, see [AWS Deep Learning Containers for PyTorch 1.12.0](https://aws.amazon.com/releasenotes/aws-deep-learning-containers-for-pytorch-1-12-0-on-sagemaker/). | pytorch-1.12-gpu-py38 | Python 3 (python3) | Python 3.8 | 
| PyTorch 1.10 Python 3.8 CPU Optimized | November 1, 2024 | The AWS Deep Learning Containers for PyTorch 1.10 include containers for training on CPU, optimized for performance and scale on AWS. For more information, see [AWS Deep Learning Containers for PyTorch 1.10.2 on SageMaker AI](https://aws.amazon.com/releasenotes/aws-deep-learning-containers-for-pytorch-1-10-2-on-sagemaker/). | pytorch-1.10-cpu-py38 | Python 3 (python3) | Python 3.8 | 
| PyTorch 1.10 Python 3.8 GPU Optimized | November 1, 2024 | The AWS Deep Learning Containers for PyTorch 1.10 with CUDA 11.3 include containers for training on GPU, optimized for performance and scale on AWS. For more information, see [AWS Deep Learning Containers for PyTorch 1.10.2 on SageMaker AI](https://aws.amazon.com/releasenotes/aws-deep-learning-containers-for-pytorch-1-10-2-on-sagemaker/). | pytorch-1.10-gpu-py38 | Python 3 (python3) | Python 3.8 | 
| SparkAnalytics 1.0 | November 1, 2024 | Anaconda Individual Edition with PySpark and Spark kernels. For more information, see [sparkmagic](https://github.com/jupyter-incubator/sparkmagic). | sagemaker-sparkanalytics-v1 |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/sagemaker/latest/dg/notebooks-available-images.html)  | Python 3.8 | 
| TensorFlow 2.13.0 Python 3.10 CPU Optimized | November 1, 2024 | The AWS Deep Learning Containers for TensorFlow 2.13 with CUDA 11.8 include containers for training on CPU, optimized for performance and scale on AWS. For more information, see [Release Notes for Deep Learning Containers.](https://docs.aws.amazon.com/deep-learning-containers/latest/devguide/dlc-release-notes.html). | tensorflow-2.13.0-cpu-py310-ubuntu20.04-sagemaker-v1.0 | Python 3 (python3) | Python 3.10 | 
| TensorFlow 2.13.0 Python 3.10 GPU Optimized | November 1, 2024 | The AWS Deep Learning Containers for TensorFlow 2.13 with CUDA 11.8 include containers for training on GPU, optimized for performance and scale on AWS. For more information, see [Release Notes for Deep Learning Containers.](https://docs.aws.amazon.com/deep-learning-containers/latest/devguide/dlc-release-notes.html) | tensorflow-2.13.0-gpu-py310-cu118-ubuntu20.04-sagemaker-v1.0 | Python 3 (python3) | Python 3.10 | 
| TensorFlow 2.6 Python 3.8 CPU Optimized | November 1, 2024 | The AWS Deep Learning Containers for TensorFlow 2.6 include containers for training on CPU, optimized for performance and scale on AWS. For more information, see [AWS Deep Learning Containers for TensorFlow 2.6](https://aws.amazon.com/releasenotes/aws-deep-learning-containers-for-tensorflow-2-6/). | tensorflow-2.6-cpu-py38-ubuntu20.04-v1 | Python 3 (python3) | Python 3.8 | 
| TensorFlow 2.6 Python 3.8 GPU Optimized | November 1, 2024 | The AWS Deep Learning Containers for TensorFlow 2.6 with CUDA 11.2 include containers for training on GPU, optimized for performance and scale on AWS. For more information, see [AWS Deep Learning Containers for TensorFlow 2.6](https://aws.amazon.com/releasenotes/aws-deep-learning-containers-for-tensorflow-2-6/). | tensorflow-2.6-gpu-py38-cu112-ubuntu20.04-v1 | Python 3 (python3) | Python 3.8 | 
| PyTorch 2.0.1 Python 3.10 CPU Optimized | November 1, 2024 | The AWS Deep Learning Containers for PyTorch 2.0.1 with CUDA 12.1 include containers for training on CPU, optimized for performance and scale on AWS. For more information, see [Release Notes for Deep Learning Containers](https://docs.aws.amazon.com/deep-learning-containers/latest/devguide/dlc-release-notes.html). | pytorch-2.0.1-cpu-py310 | Python 3 (python3) | Python 3.10 | 
| PyTorch 2.0.1 Python 3.10 GPU Optimized | November 1, 2024 | The AWS Deep Learning Containers for PyTorch 2.0.1 with CUDA 12.1 include containers for training on GPU, optimized for performance and scale on AWS. For more information, see [Release Notes for Deep Learning Containers](https://docs.aws.amazon.com/deep-learning-containers/latest/devguide/dlc-release-notes.html). | pytorch-2.0.1-gpu-py310 | Python 3 (python3) | Python 3.10 | 
| PyTorch 2.0.0 Python 3.10 CPU Optimized | November 1, 2024 | The AWS Deep Learning Containers for PyTorch 2.0.0 include containers for training on CPU, optimized for performance and scale on AWS. For more information, see [Release Notes for Deep Learning Containers](https://docs.aws.amazon.com/deep-learning-containers/latest/devguide/dlc-release-notes.html). | pytorch-2.0.0-cpu-py310 | Python 3 (python3) | Python 3.10 | 
| PyTorch 2.0.0 Python 3.10 GPU Optimized | November 1, 2024 | The AWS Deep Learning Containers for PyTorch 2.0.0 with CUDA 11.8 include containers for training on GPU, optimized for performance and scale on AWS. For more information, see [Release Notes for Deep Learning Containers](https://docs.aws.amazon.com/deep-learning-containers/latest/devguide/dlc-release-notes.html). | pytorch-2.0.0-gpu-py310 | Python 3 (python3) | Python 3.10 | 
| TensorFlow 2.12.0 Python 3.10 CPU Optimized | November 1, 2024 | The AWS Deep Learning Containers for TensorFlow 2.12.0 with CUDA 11.2 include containers for training on CPU, optimized for performance and scale on AWS. For more information, see [Release Notes for Deep Learning Containers](https://docs.aws.amazon.com/deep-learning-containers/latest/devguide/dlc-release-notes.html). | tensorflow-2.12.0-cpu-py310-ubuntu20.04-sagemaker-v1.0 | Python 3 (python3) | Python 3.10 | 
| TensorFlow 2.12.0 Python 3.10 GPU Optimized | November 1, 2024 | The AWS Deep Learning Containers for TensorFlow 2.12.0 with CUDA 11.8 include containers for training on GPU, optimized for performance and scale on AWS. For more information, see [Release Notes for Deep Learning Containers](https://docs.aws.amazon.com/deep-learning-containers/latest/devguide/dlc-release-notes.html). | tensorflow-2.12.0-gpu-py310-cu118-ubuntu20.04-sagemaker-v1 | Python 3 (python3) | Python 3.10 | 
| TensorFlow 2.11.0 Python 3.9 CPU Optimized | November 1, 2024 | The AWS Deep Learning Containers for TensorFlow 2.11.0 with CUDA 11.2 include containers for training on CPU, optimized for performance and scale on AWS. For more information, see [Release Notes for Deep Learning Containers](https://docs.aws.amazon.com/deep-learning-containers/latest/devguide/dlc-release-notes.html). | tensorflow-2.11.0-cpu-py39-ubuntu20.04-sagemaker-v1.1 | Python 3 (python3) | Python 3.9 | 
| TensorFlow 2.11.0 Python 3.9 GPU Optimized | November 1, 2024 | The AWS Deep Learning Containers for TensorFlow 2.11.0 with CUDA 11.2 include containers for training on GPU, optimized for performance and scale on AWS. For more information, see [Release Notes for Deep Learning Containers](https://docs.aws.amazon.com/deep-learning-containers/latest/devguide/dlc-release-notes.html). | tensorflow-2.11.0-gpu-py39-cu112-ubuntu20.04-sagemaker-v1.1 | Python 3 (python3) | Python 3.9 | 
| TensorFlow 2.10 Python 3.9 CPU Optimized | November 1, 2024 | The AWS Deep Learning Containers for TensorFlow 2.10 with CUDA 11.2 include containers for training on CPU, optimized for performance and scale on AWS. For more information, see [Release Notes for Deep Learning Containers](https://docs.aws.amazon.com/deep-learning-containers/latest/devguide/dlc-release-notes.html). | tensorflow-2.10.1-cpu-py39-ubuntu20.04-sagemaker-v1.2 | Python 3 (python3) | Python 3.9 | 
| TensorFlow 2.10 Python 3.9 GPU Optimized | November 1, 2024 | The AWS Deep Learning Containers for TensorFlow 2.10 with CUDA 11.2 include containers for training on GPU, optimized for performance and scale on AWS. For more information, see [Release Notes for Deep Learning Containers](https://docs.aws.amazon.com/deep-learning-containers/latest/devguide/dlc-release-notes.html). | tensorflow-2.10.1-gpu-py39-ubuntu20.04-sagemaker-v1.2 | Python 3 (python3) | Python 3.9 | 

## Deprecated images
<a name="notebooks-available-images-deprecated"></a>

SageMaker AI has ended support for the following images. Deprecation occurs the day after any of the packages in the image reach end-of life by their publisher.

SageMaker images slated for deprecation


| SageMaker Image | Deprecation date | Description | Resource Identifier | Kernels | Python Version | 
| --- | --- | --- | --- | --- | --- | 
| Data Science | October 30, 2023 | Data Science is a Python 3.7 [conda](https://docs.conda.io/projects/conda/en/latest/index.html) image with the most commonly used Python packages and libraries, such as NumPy and SciKit Learn. | datascience-1.0 | Python 3 | Python 3.7 | 
| SageMaker JumpStart Data Science 1.0 | October 30, 2023 | SageMaker JumpStart Data Science 1.0 is a JumpStart image that includes commonly used packages and libraries. | sagemaker-jumpstart-data-science-1.0 | Python 3 | Python 3.7 | 
| SageMaker JumpStart MXNet 1.0 | October 30, 2023 | SageMaker JumpStart MXNet 1.0 is a JumpStart image that includes MXNet. | sagemaker-jumpstart-mxnet-1.0 | Python 3 | Python 3.7 | 
| SageMaker JumpStart PyTorch 1.0 | October 30, 2023 | SageMaker JumpStart PyTorch 1.0 is a JumpStart image that includes PyTorch. | sagemaker-jumpstart-pytorch-1.0 | Python 3 | Python 3.7 | 
| SageMaker JumpStart TensorFlow 1.0 | October 30, 2023 | SageMaker JumpStart TensorFlow 1.0 is a JumpStart image that includes TensorFlow. | sagemaker-jumpstart-tensorflow-1.0 | Python 3 | Python 3.7 | 
| SparkMagic | October 30, 2023 | Anaconda Individual Edition with PySpark and Spark kernels. For more information, see [sparkmagic](https://github.com/jupyter-incubator/sparkmagic). | sagemaker-sparkmagic |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/sagemaker/latest/dg/notebooks-available-images.html)  | Python 3.7 | 
| TensorFlow 2.3 Python 3.7 CPU Optimized | October 30, 2023 | The AWS Deep Learning Containers for TensorFlow 2.3 include containers for training on CPU, optimized for performance and scale on AWS. For more information, see [AWS Deep Learning Containers with TensorFlow 2.3.0](https://aws.amazon.com/releasenotes/aws-deep-learning-containers-with-tensorflow-2-3-0/). | tensorflow-2.3-cpu-py37-ubuntu18.04-v1 | Python 3 | Python 3.7 | 
| TensorFlow 2.3 Python 3.7 GPU Optimized | October 30, 2023 | The AWS Deep Learning Containers for TensorFlow 2.3 with CUDA 11.0 include containers for training on GPU, optimized for performance and scale on AWS. For more information, see [AWS Deep Learning Containers for TensorFlow 2.3.1 with CUDA 11.0](https://aws.amazon.com/releasenotes/aws-deep-learning-containers-for-tensorflow-2-3-1-with-cuda-11-0/). | tensorflow-2.3-gpu-py37-cu110-ubuntu18.04-v3 | Python 3 | Python 3.7 | 
| TensorFlow 1.15 Python 3.7 CPU Optimized | October 30, 2023 | The AWS Deep Learning Containers for TensorFlow 1.15 include containers for training on CPU, optimized for performance and scale on AWS. For more information, see [AWS Deep Learning Containers v7.0 for TensorFlow](https://aws.amazon.com/releasenotes/aws-deep-learning-containers-v7-0-for-tensorflow/). | tensorflow-1.15-cpu-py37-ubuntu18.04-v7 | Python 3 | Python 3.7 | 
| TensorFlow 1.15 Python 3.7 GPU Optimized | October 30, 2023 | The AWS Deep Learning Containers for TensorFlow 1.15 with CUDA 11.0 include containers for training on GPU, optimized for performance and scale on AWS. For more information, see [AWS Deep Learning Containers v7.0 for TensorFlow](https://aws.amazon.com/releasenotes/aws-deep-learning-containers-v7-0-for-tensorflow/). | tensorflow-1.15-gpu-py37-cu110-ubuntu18.04-v8 | Python 3 | Python 3.7 | 

# Customize Amazon SageMaker Studio Classic
<a name="studio-customize"></a>

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

There are four options for customizing your Amazon SageMaker Studio Classic environment. You bring your own SageMaker image, use a lifecycle configuration script, attach suggested Git repos to Studio Classic, or create kernels using persistent Conda environments in Amazon EFS. Use each option individually, or together. 
+ **Bring your own SageMaker image:** A SageMaker image is a file that identifies the kernels, language packages, and other dependencies required to run a Jupyter notebook in Amazon SageMaker Studio Classic. Amazon SageMaker AI provides many built-in images for you to use. If you need different functionality, you can bring your own custom images to Studio Classic.
+ **Use lifecycle configurations with Amazon SageMaker Studio Classic:** Lifecycle configurations are shell scripts triggered by Amazon SageMaker Studio Classic lifecycle events, such as starting a new Studio Classic notebook. You can use lifecycle configurations to automate customization for your Studio Classic environment. For example, you can install custom packages, configure notebook extensions, preload datasets, and set up source code repositories.
+ **Attach suggested Git repos to Studio Classic:** You can attach suggested Git repository URLs at the Amazon SageMaker AI domain or user profile level. Then, you can select the repo URL from the list of suggestions and clone that into your environment using the Git extension in Studio Classic. 
+ **Persist Conda environments to the Studio Classic Amazon EFS volume:** Studio Classic uses an Amazon EFS volume as a persistent storage layer. You can save your Conda environment on this Amazon EFS volume, then use the saved environment to create kernels. Studio Classic automatically picks up all valid environments saved in Amazon EFS as KernelGateway kernels. These kernels persist through restart of the kernel, app, and Studio Classic. For more information, see the **Persist Conda environments to the Studio Classic EFS volume** section in [Four approaches to manage Python packages in Amazon SageMaker Studio Classic notebooks](https://aws.amazon.com/blogs/machine-learning/four-approaches-to-manage-python-packages-in-amazon-sagemaker-studio-notebooks/).

The following topics show how to use these three options to customize your Amazon SageMaker Studio Classic environment.

**Topics**
+ [Custom Images in Amazon SageMaker Studio Classic](studio-byoi.md)
+ [Use Lifecycle Configurations to Customize Amazon SageMaker Studio Classic](studio-lcc.md)
+ [Attach Suggested Git Repos to Amazon SageMaker Studio Classic](studio-git-attach.md)

# Custom Images in Amazon SageMaker Studio Classic
<a name="studio-byoi"></a>

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

A SageMaker image is a file that identifies the kernels, language packages, and other dependencies required to run a Jupyter notebook in Amazon SageMaker Studio Classic. These images are used to create an environment that you then run Jupyter notebooks from. Amazon SageMaker AI provides many built-in images for you to use. For the list of built-in images, see [Amazon SageMaker Images Available for Use With Studio Classic Notebooks](notebooks-available-images.md).

If you need different functionality, you can bring your own custom images to Studio Classic. You can create images and image versions, and attach image versions to your domain or shared space, using the SageMaker AI control panel, the [AWS SDK for Python (Boto3)](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/sagemaker.html), and the [AWS Command Line Interface (AWS CLI)](https://docs.aws.amazon.com/cli/latest/reference/sagemaker/). You can also create images and image versions using the SageMaker AI console, even if you haven't onboarded to a SageMaker AI domain. SageMaker AI provides sample Dockerfiles to use as a starting point for your custom SageMaker images in the [SageMaker Studio Classic Custom Image Samples](https://github.com/aws-samples/sagemaker-studio-custom-image-samples/) repository.

The following topics explain how to bring your own image using the SageMaker AI console or AWS CLI, then launch the image in Studio Classic. For a similar blog article, see [Bringing your own R environment to Amazon SageMaker Studio Classic](https://aws.amazon.com/blogs/machine-learning/bringing-your-own-r-environment-to-amazon-sagemaker-studio/). For notebooks that show how to bring your own image for use in training and inference, see [Amazon SageMaker Studio Classic Container Build CLI](https://github.com/aws/amazon-sagemaker-examples/tree/main/aws_sagemaker_studio/sagemaker_studio_image_build).

## Key terminology
<a name="studio-byoi-basics"></a>

The following section defines key terms for bringing your own image to use with Studio Classic.
+ **Dockerfile:** A Dockerfile is a file that identifies the language packages and other dependencies for your Docker image.
+ **Docker image:** The Docker image is a built Dockerfile. This image is checked into Amazon ECR and serves as the basis of the SageMaker AI image.
+ **SageMaker image:** A SageMaker image is a holder for a set of SageMaker AI image versions based on Docker images. Each image version is immutable.
+ **Image version:** An image version of a SageMaker image represents a Docker image and is stored in an Amazon ECR repository. Each image version is immutable. These image versions can be attached to a domain or shared space and used with Studio Classic.

**Topics**
+ [Key terminology](#studio-byoi-basics)
+ [Custom SageMaker Image Specifications for Amazon SageMaker Studio Classic](studio-byoi-specs.md)
+ [Prerequisites for Custom Images in Amazon SageMaker Studio Classic](studio-byoi-prereq.md)
+ [Add a Docker Image Compatible with Amazon SageMaker Studio Classic to Amazon ECR](studio-byoi-sdk-add-container-image.md)
+ [Create a Custom SageMaker Image for Amazon SageMaker Studio Classic](studio-byoi-create.md)
+ [Attach a Custom SageMaker Image in Amazon SageMaker Studio Classic](studio-byoi-attach.md)
+ [Launch a Custom SageMaker Image in Amazon SageMaker Studio Classic](studio-byoi-launch.md)
+ [Clean Up Resources for Custom Images in Amazon SageMaker Studio Classic](studio-byoi-cleanup.md)

# Custom SageMaker Image Specifications for Amazon SageMaker Studio Classic
<a name="studio-byoi-specs"></a>

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

The following specifications apply to the container image that is represented by a SageMaker AI image version.

**Running the image**  
`ENTRYPOINT` and `CMD` instructions are overridden to enable the image to run as a KernelGateway app.  
Port 8888 in the image is reserved for running the KernelGateway web server.

**Stopping the image**  
The `DeleteApp` API issues the equivalent of a `docker stop` command. Other processes in the container won’t get the SIGKILL/SIGTERM signals.

**Kernel discovery**  
SageMaker AI recognizes kernels as defined by Jupyter [kernel specs](https://jupyter-client.readthedocs.io/en/latest/kernels.html#kernelspecs).  
You can specify a list of kernels to display before running the image. If not specified, python3 is displayed. Use the [DescribeAppImageConfig](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeAppImageConfig.html) API to view the list of kernels.  
Conda environments are recognized as kernel specs by default. 

**File system**  
The `/opt/.sagemakerinternal` and `/opt/ml` directories are reserved. Any data in these directories might not be visible at runtime.

**User data**  
Each user in a domain gets a user directory on a shared Amazon Elastic File System volume in the image. The location of the current user's directory on the Amazon EFS volume is configurable. By default, the location of the directory is `/home/sagemaker-user`.  
SageMaker AI configures POSIX UID/GID mappings between the image and the host. This defaults to mapping the root user's UID/GID (0/0) to the UID/GID on the host.  
You can specify these values using the [CreateAppImageConfig](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateAppImageConfig.html) API.

**GID/UID limits**  
Amazon SageMaker Studio Classic only supports the following `DefaultUID` and `DefaultGID` combinations:   
+  DefaultUID: 1000 and DefaultGID: 100, which corresponds to a non-priveleged user.
+  DefaultUID: 0 and DefaultGID: 0, which corresponds to root access.

**Metadata**  
A metadata file is located at `/opt/ml/metadata/resource-metadata.json`. No additional environment variables are added to the variables defined in the image. For more information, see [Get App Metadata](notebooks-run-and-manage-metadata.md#notebooks-run-and-manage-metadata-app).

**GPU**  
On a GPU instance, the image is run with the `--gpus` option. Only the CUDA toolkit should be included in the image not the NVIDIA drivers. For more information, see [NVIDIA User Guide](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/user-guide.html).

**Metrics and logging**  
Logs from the KernelGateway process are sent to Amazon CloudWatch in the customer’s account. The name of the log group is `/aws/sagemaker/studio`. The name of the log stream is `$domainID/$userProfileName/KernelGateway/$appName`.

**Image size**  
Limited to 35 GB. To view the size of your image, run `docker image ls`.  


## Sample Dockerfile
<a name="studio-byoi-specs-sample"></a>

The following sample Dockerfile creates an image based Amazon Linux 2, installs third party packages and the `python3` kernel, and sets the scope to the non-privileged user.

```
FROM public.ecr.aws/amazonlinux/amazonlinux:2

ARG NB_USER="sagemaker-user"
ARG NB_UID="1000"
ARG NB_GID="100"

RUN \
    yum install --assumeyes python3 shadow-utils && \
    useradd --create-home --shell /bin/bash --gid "${NB_GID}" --uid ${NB_UID} ${NB_USER} && \
    yum clean all && \
    jupyter-activity-monitor-extension \
    python3 -m pip install ipykernel && \
    python3 -m ipykernel install

USER ${NB_UID}
```

# Prerequisites for Custom Images in Amazon SageMaker Studio Classic
<a name="studio-byoi-prereq"></a>

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

You must satisfy the following prerequisites to bring your own container for use with Amazon SageMaker Studio Classic.
+ The Docker application. For information about setting up Docker, see [Orientation and setup](https://docs.docker.com/get-started/).
+ Install the AWS CLI by following the steps in [Getting started with the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html).
+ A local copy of any Dockerfile for creating a Studio Classic compatible image. For sample custom images, see the [SageMaker AI Studio Classic custom image samples](https://github.com/aws-samples/sagemaker-studio-custom-image-samples/) repository.
+ Permissions to access the Amazon Elastic Container Registry (Amazon ECR) service. For more information, see [Amazon ECR Managed Policies](https://docs.aws.amazon.com/AmazonECR/latest/userguide/ecr_managed_policies.html).
+ An AWS Identity and Access Management execution role that has the [AmazonSageMakerFullAccess](https://console.aws.amazon.com/iam/home?#/policies/arn:aws:iam::aws:policy/AmazonSageMakerFullAccess) policy attached. If you have onboarded to Amazon SageMaker AI domain, you can get the role from the **Domain Summary** section of the SageMaker AI control panel.
+ Install the Studio Classic image build CLI by following the steps in [SageMaker Docker Build](https://github.com/aws-samples/sagemaker-studio-image-build-cli). This CLI enables you to build a Dockerfile using AWS CodeBuild.

# Add a Docker Image Compatible with Amazon SageMaker Studio Classic to Amazon ECR
<a name="studio-byoi-sdk-add-container-image"></a>

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

You perform the following steps to add a container image to Amazon ECR:
+ Create an Amazon ECR repository.
+ Authenticate to Amazon ECR.
+ Build a Docker image compatible with Studio Classic.
+ Push the image to the Amazon ECR repository.

**Note**  
The Amazon ECR repository must be in the same AWS Region as Studio Classic.

**To build and add a container image to Amazon ECR**

1. Create an Amazon ECR repository using the AWS CLI. To create the repository using the Amazon ECR console, see [Creating a repository](https://docs.aws.amazon.com/AmazonECR/latest/userguide/repository-create.html).

   ```
   aws ecr create-repository \
       --repository-name smstudio-custom \
       --image-scanning-configuration scanOnPush=true
   ```

   The response should look similar to the following.

   ```
   {
       "repository": {
           "repositoryArn": "arn:aws:ecr:us-east-2:acct-id:repository/smstudio-custom",
           "registryId": "acct-id",
           "repositoryName": "smstudio-custom",
           "repositoryUri": "acct-id.dkr.ecr.us-east-2.amazonaws.com/smstudio-custom",
           ...
       }
   }
   ```

1. Build the `Dockerfile` using the Studio Classic image build CLI. The period (.) specifies that the Dockerfile should be in the context of the build command. This command builds the image and uploads the built image to the ECR repo. It then outputs the image URI.

   ```
   sm-docker build . --repository smstudio-custom:custom
   ```

   The response should look similar to the following.

   ```
   Image URI: <acct-id>.dkr.ecr.<region>.amazonaws.com/<image_name>
   ```

# Create a Custom SageMaker Image for Amazon SageMaker Studio Classic
<a name="studio-byoi-create"></a>

**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 AI resources](security_iam_id-based-policy-examples.md#grant-tagging-permissions).  
[AWS managed policies for Amazon SageMaker AI](security-iam-awsmanpol.md) that give permissions to create SageMaker resources already include permissions to add tags while creating those resources.

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

This topic describes how you can create a custom SageMaker image using the SageMaker AI console or AWS CLI.

When you create an image from the console, SageMaker AI also creates an initial image version. The image version represents a container image in [Amazon Elastic Container Registry (ECR)](https://console.aws.amazon.com/ecr/). The container image must satisfy the requirements to be used in Amazon SageMaker Studio Classic. For more information, see [Custom SageMaker Image Specifications for Amazon SageMaker Studio Classic](studio-byoi-specs.md). For information on testing your image locally and resolving common issues, see the [SageMaker Studio Classic Custom Image Samples repo](https://github.com/aws-samples/sagemaker-studio-custom-image-samples/blob/main/DEVELOPMENT.md).

After you have created your custom SageMaker image, you must attach it to your domain or shared space to use it with Studio Classic. For more information, see [Attach a Custom SageMaker Image in Amazon SageMaker Studio Classic](studio-byoi-attach.md).

## Create a SageMaker image from the console
<a name="studio-byoi-create-console"></a>

The following section demonstrates how to create a custom SageMaker image from the SageMaker AI console.

**To create an image**

1. Open the Amazon SageMaker AI console at [https://console.aws.amazon.com/sagemaker/](https://console.aws.amazon.com/sagemaker/).

1. On the left navigation pane, choose **Admin configurations**.

1. Under **Admin configurations**, choose **Images**. 

1. On the **Custom images** page, choose **Create image**.

1. For **Image source**, enter the registry path to the container image in Amazon ECR. The path is in the following format:

   ` acct-id.dkr.ecr.region.amazonaws.com/repo-name[:tag] or [@digest] `

1. Choose **Next**.

1. Under **Image properties**, enter the following:
   + Image name – The name must be unique to your account in the current AWS Region.
   + (Optional) Display name – The name displayed in the Studio Classic user interface. When not provided, `Image name` is displayed.
   + (Optional) Description – A description of the image.
   + IAM role – The role must have the [AmazonSageMakerFullAccess](https://console.aws.amazon.com/iam/home?#/policies/arn:aws:iam::aws:policy/AmazonSageMakerFullAccess) policy attached. Use the dropdown menu to choose one of the following options:
     + Create a new role – Specify any additional Amazon Simple Storage Service (Amazon S3) buckets that you want users of your notebooks to have access to. If you don't want to allow access to additional buckets, choose **None**.

       SageMaker AI attaches the `AmazonSageMakerFullAccess` policy to the role. The role allows users of your notebooks access to the S3 buckets listed next to the checkmarks.
     + Enter a custom IAM role ARN – Enter the Amazon Resource Name (ARN) of your IAM role.
     + Use existing role – Choose one of your existing roles from the list.
   + (Optional) Image tags – Choose **Add new tag**. You can add up to 50 tags. Tags are searchable using the Studio Classic user interface, the SageMaker AI console, or the SageMaker AI `Search` API.

1. Choose **Submit**.

The new image is displayed in the **Custom images** list and briefly highlighted. After the image has been successfully created, you can choose the image name to view its properties or choose **Create version** to create another version.

**To create another image version**

1. Choose **Create version** on the same row as the image.

1. For **Image source**, enter the registry path to the Amazon ECR container image. The container image shouldn't be the same image as used in a previous version of the SageMaker image.

## Create a SageMaker image from the AWS CLI
<a name="studio-byoi-sdk-create-image"></a>

You perform the following steps to create a SageMaker image from the container image using the AWS CLI.
+ Create an `Image`.
+ Create an `ImageVersion`.
+ Create a configuration file.
+ Create an `AppImageConfig`.

**To create the SageMaker image entities**

1. Create a SageMaker image.

   ```
   aws sagemaker create-image \
       --image-name custom-image \
       --role-arn arn:aws:iam::<acct-id>:role/service-role/<execution-role>
   ```

   The response should look similar to the following.

   ```
   {
       "ImageArn": "arn:aws:sagemaker:us-east-2:acct-id:image/custom-image"
   }
   ```

1. Create a SageMaker image version from the container image.

   ```
   aws sagemaker create-image-version \
       --image-name custom-image \
       --base-image <acct-id>.dkr.ecr.<region>.amazonaws.com/smstudio-custom:custom-image
   ```

   The response should look similar to the following.

   ```
   {
       "ImageVersionArn": "arn:aws:sagemaker:us-east-2:acct-id:image-version/custom-image/1"
   }
   ```

1. Check that the image version was successfully created.

   ```
   aws sagemaker describe-image-version \
       --image-name custom-image \
       --version-number 1
   ```

   The response should look similar to the following.

   ```
   {
       "ImageVersionArn": "arn:aws:sagemaker:us-east-2:acct-id:image-version/custom-image/1",
       "ImageVersionStatus": "CREATED"
   }
   ```
**Note**  
If the response is `"ImageVersionStatus": "CREATED_FAILED"`, the response also includes the failure reason. A permissions issue is a common cause of failure. You also can check your Amazon CloudWatch logs if you experience a failure when starting or running the KernelGateway app for a custom image. The name of the log group is `/aws/sagemaker/studio`. The name of the log stream is `$domainID/$userProfileName/KernelGateway/$appName`.

1. Create a configuration file, named `app-image-config-input.json`. The `Name` value of `KernelSpecs` must match the name of the kernelSpec available in the Image associated with this `AppImageConfig`. This value is case sensitive. You can find the available kernelSpecs in an image by running `jupyter-kernelspec list` from a shell inside the container. `MountPath` is the path within the image to mount your Amazon Elastic File System (Amazon EFS) home directory. It needs to be different from the path you use inside the container because that path will be overridden when your Amazon EFS home directory is mounted.
**Note**  
The following `DefaultUID` and `DefaultGID` combinations are the only accepted values:   
 DefaultUID: 1000 and DefaultGID: 100 
 DefaultUID: 0 and DefaultGID: 0 

   ```
   {
       "AppImageConfigName": "custom-image-config",
       "KernelGatewayImageConfig": {
           "KernelSpecs": [
               {
                   "Name": "python3",
                   "DisplayName": "Python 3 (ipykernel)"
               }
           ],
           "FileSystemConfig": {
               "MountPath": "/home/sagemaker-user",
               "DefaultUid": 1000,
               "DefaultGid": 100
           }
       }
   }
   ```

1. Create the AppImageConfig using the file created in the previous step.

   ```
   aws sagemaker create-app-image-config \
       --cli-input-json file://app-image-config-input.json
   ```

   The response should look similar to the following.

   ```
   {
       "AppImageConfigArn": "arn:aws:sagemaker:us-east-2:acct-id:app-image-config/custom-image-config"
   }
   ```

# Attach a Custom SageMaker Image in Amazon SageMaker Studio Classic
<a name="studio-byoi-attach"></a>

**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 AI resources](security_iam_id-based-policy-examples.md#grant-tagging-permissions).  
[AWS managed policies for Amazon SageMaker AI](security-iam-awsmanpol.md) that give permissions to create SageMaker resources already include permissions to add tags while creating those resources.

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

To use a custom SageMaker image, you must attach a version of the image to your domain or shared space. When you attach an image version, it appears in the SageMaker Studio Classic Launcher and is available in the **Select image** dropdown list, which users use to launch an activity or change the image used by a notebook.

To make a custom SageMaker image available to all users within a domain, you attach the image to the domain. To make an image available to all users within a shared space, you can attach the image to the shared space. To make an image available to a single user, you attach the image to the user's profile. When you attach an image, SageMaker AI uses the latest image version by default. You can also attach a specific image version. After you attach the version, you can choose the version from the SageMaker AI Launcher or the image selector when you launch a notebook.

There is a limit to the number of image versions that can be attached at any given time. After you reach the limit, you must detach a version in order to attach another version of the image.

The following sections demonstrate how to attach a custom SageMaker image to your domain using either the SageMaker AI console or the AWS CLI. You can only attach a custom image to a share space using the AWS CLI.

## Attach the SageMaker image to a domain
<a name="studio-byoi-attach-domain"></a>

### Attach the SageMaker image using the Console
<a name="studio-byoi-attach-existing"></a>

This topic describes how you can attach an existing custom SageMaker image version to your domain using the SageMaker AI control panel. You can also create a custom SageMaker image and image version, and then attach that version to your domain. For the procedure to create an image and image version, see [Create a Custom SageMaker Image for Amazon SageMaker Studio Classic](studio-byoi-create.md).

**To attach an existing image**

1. Open the Amazon SageMaker AI console at [https://console.aws.amazon.com/sagemaker/](https://console.aws.amazon.com/sagemaker/).

1. On the left navigation pane, choose **Admin configurations**.

1. Under **Admin configurations**, choose **domains**. 

1. From the **Domains** page, select the domain to attach the image to.

1. From the **Domain details** page, select the **Environment** tab.

1. On the **Environment** tab, under **Custom SageMaker Studio Classic images attached to domain**, choose **Attach image**.

1. For **Image source**, choose **Existing image**.

1. Choose an existing image from the list.

1. Choose a version of the image from the list.

1. Choose **Next**.

1. Verify the values for **Image name**, **Image display name**, and **Description**.

1. Choose the IAM role. For more information, see [Create a Custom SageMaker Image for Amazon SageMaker Studio Classic](studio-byoi-create.md).

1. (Optional) Add tags for the image.

1. Specify the EFS mount path. This is the path within the image to mount the user's Amazon Elastic File System (EFS) home directory.

1. For **Image type**, select **SageMaker Studio image**

1. For **Kernel name**, enter the name of an existing kernel in the image. For information on how to get the kernel information from the image, see [DEVELOPMENT](https://github.com/aws-samples/sagemaker-studio-custom-image-samples/blob/main/DEVELOPMENT.md) in the SageMaker Studio Classic Custom Image Samples repository. For more information, see the **Kernel discovery** and **User data** sections of [Custom SageMaker Image Specifications for Amazon SageMaker Studio Classic](studio-byoi-specs.md).

1. (Optional) For **Kernel display name**, enter the display name for the kernel.

1. Choose **Add kernel**.

1. Choose **Submit**. 

   1. Wait for the image version to be attached to the domain. When attached, the version is displayed in the **Custom images** list and briefly highlighted.

### Attach the SageMaker image using the AWS CLI
<a name="studio-byoi-sdk-attach"></a>

The following sections demonstrate how to attach a custom SageMaker image when creating a new domain or updating your existing domain using the AWS CLI.

#### Attach the SageMaker image to a new domain
<a name="studio-byoi-sdk-attach-new-domain"></a>

The following section demonstrates how to create a new domain with the version attached. These steps require that you specify the Amazon Virtual Private Cloud (VPC) information and execution role required to create the domain. You perform the following steps to create the domain and attach the custom SageMaker image:
+ Get your default VPC ID and subnet IDs.
+ Create the configuration file for the domain, which specifies the image.
+ Create the domain with the configuration file.

**To add the custom SageMaker image to your domain**

1. Get your default VPC ID.

   ```
   aws ec2 describe-vpcs \
       --filters Name=isDefault,Values=true \
       --query "Vpcs[0].VpcId" --output text
   ```

   The response should look similar to the following.

   ```
   vpc-xxxxxxxx
   ```

1. Get your default subnet IDs using the VPC ID from the previous step.

   ```
   aws ec2 describe-subnets \
       --filters Name=vpc-id,Values=<vpc-id> \
       --query "Subnets[*].SubnetId" --output json
   ```

   The response should look similar to the following.

   ```
   [
       "subnet-b55171dd",
       "subnet-8a5f99c6",
       "subnet-e88d1392"
   ]
   ```

1. Create a configuration file named `create-domain-input.json`. Insert the VPC ID, subnet IDs, `ImageName`, and `AppImageConfigName` from the previous steps. Because `ImageVersionNumber` isn't specified, the latest version of the image is used, which is the only version in this case.

   ```
   {
       "DomainName": "domain-with-custom-image",
       "VpcId": "<vpc-id>",
       "SubnetIds": [
           "<subnet-ids>"
       ],
       "DefaultUserSettings": {
           "ExecutionRole": "<execution-role>",
           "KernelGatewayAppSettings": {
               "CustomImages": [
                   {
                       "ImageName": "custom-image",
                       "AppImageConfigName": "custom-image-config"
                   }
               ]
           }
       },
       "AuthMode": "IAM"
   }
   ```

1. Create the domain with the attached custom SageMaker image.

   ```
   aws sagemaker create-domain \
       --cli-input-json file://create-domain-input.json
   ```

   The response should look similar to the following.

   ```
   {
       "DomainArn": "arn:aws:sagemaker:us-east-2:acct-id:domain/d-xxxxxxxxxxxx",
       "Url": "https://d-xxxxxxxxxxxx.studio.us-east-2.sagemaker.aws/..."
   }
   ```

#### Attach the SageMaker image to your current domain
<a name="studio-byoi-sdk-attach-current-domain"></a>

If you have onboarded to a SageMaker AI domain, you can attach the custom image to your current domain. For more information about onboarding to a SageMaker AI domain, see [Amazon SageMaker AI domain overview](gs-studio-onboard.md). You don't need to specify the VPC information and execution role when attaching a custom image to your current domain. After you attach the version, you must delete all the apps in your domain and reopen Studio Classic. For information about deleting the apps, see [Delete an Amazon SageMaker AI domain](gs-studio-delete-domain.md).

You perform the following steps to add the SageMaker image to your current domain.
+ Get your `DomainID` from SageMaker AI control panel.
+ Use the `DomainID` to get the `DefaultUserSettings` for the domain.
+ Add the `ImageName` and `AppImageConfig` as a `CustomImage` to the `DefaultUserSettings`.
+ Update your domain to include the custom image.

**To add the custom SageMaker image to your domain**

1. Open the Amazon SageMaker AI console at [https://console.aws.amazon.com/sagemaker/](https://console.aws.amazon.com/sagemaker/).

1. On the left navigation pane, choose **Admin configurations**.

1. Under **Admin configurations**, choose **domains**. 

1. From the **Domains** page, select the domain to attach the image to.

1. From the **Domain details** page, select the **Domain settings** tab.

1. From the **Domain settings** tab, under **General settings**, find the `DomainId`. The ID is in the following format: `d-xxxxxxxxxxxx`.

1. Use the domain ID to get the description of the domain.

   ```
   aws sagemaker describe-domain \
       --domain-id <d-xxxxxxxxxxxx>
   ```

   The response should look similar to the following.

   ```
   {
       "DomainId": "d-xxxxxxxxxxxx",
       "DefaultUserSettings": {
         "KernelGatewayAppSettings": {
           "CustomImages": [
           ],
           ...
         }
       }
   }
   ```

1. Save the default user settings section of the response to a file named `default-user-settings.json`.

1. Insert the `ImageName` and `AppImageConfigName` from the previous steps as a custom image. Because `ImageVersionNumber` isn't specified, the latest version of the image is used, which is the only version in this case.

   ```
   {
       "DefaultUserSettings": {
           "KernelGatewayAppSettings": { 
              "CustomImages": [ 
                 { 
                    "ImageName": "string",
                    "AppImageConfigName": "string"
                 }
              ],
              ...
           }
       }
   }
   ```

1. Use the domain ID and default user settings file to update your domain.

   ```
   aws sagemaker update-domain \
       --domain-id <d-xxxxxxxxxxxx> \
       --cli-input-json file://default-user-settings.json
   ```

   The response should look similar to the following.

   ```
   {
       "DomainArn": "arn:aws:sagemaker:us-east-2:acct-id:domain/d-xxxxxxxxxxxx"
   }
   ```

## Attach the SageMaker image to a shared space
<a name="studio-byoi-attach-shared-space"></a>

You can only attach the SageMaker image to a shared space using the AWS CLI. After you attach the version, you must delete all of the applications in your shared space and reopen Studio Classic. For information about deleting the apps, see [Delete an Amazon SageMaker AI domain](gs-studio-delete-domain.md).

You perform the following steps to add the SageMaker image to a shared space.
+ Get your `DomainID` from SageMaker AI control panel.
+ Use the `DomainID` to get the `DefaultSpaceSettings` for the domain.
+ Add the `ImageName` and `AppImageConfig` as a `CustomImage` to the `DefaultSpaceSettings`.
+ Update your domain to include the custom image for the shared space.

**To add the custom SageMaker image to your shared space**

1. Open the Amazon SageMaker AI console at [https://console.aws.amazon.com/sagemaker/](https://console.aws.amazon.com/sagemaker/).

1. On the left navigation pane, choose **Admin configurations**.

1. Under **Admin configurations**, choose **domains**. 

1. From the **Domains** page, select the domain to attach the image to.

1. From the **Domain details** page, select the **Domain settings** tab.

1. From the **Domain settings** tab, under **General settings**, find the `DomainId`. The ID is in the following format: `d-xxxxxxxxxxxx`.

1. Use the domain ID to get the description of the domain.

   ```
   aws sagemaker describe-domain \
       --domain-id <d-xxxxxxxxxxxx>
   ```

   The response should look similar to the following.

   ```
   {
       "DomainId": "d-xxxxxxxxxxxx",
       ...
       "DefaultSpaceSettings": {
         "KernelGatewayAppSettings": {
           "CustomImages": [
           ],
           ...
         }
       }
   }
   ```

1. Save the default space settings section of the response to a file named `default-space-settings.json`.

1. Insert the `ImageName` and `AppImageConfigName` from the previous steps as a custom image. Because `ImageVersionNumber` isn't specified, the latest version of the image is used, which is the only version in this case.

   ```
   {
       "DefaultSpaceSettings": {
           "KernelGatewayAppSettings": { 
              "CustomImages": [ 
                 { 
                    "ImageName": "string",
                    "AppImageConfigName": "string"
                 }
              ],
              ...
           }
       }
   }
   ```

1. Use the domain ID and default space settings file to update your domain.

   ```
   aws sagemaker update-domain \
       --domain-id <d-xxxxxxxxxxxx> \
       --cli-input-json file://default-space-settings.json
   ```

   The response should look similar to the following.

   ```
   {
       "DomainArn": "arn:aws:sagemaker:us-east-2:acct-id:domain/d-xxxxxxxxxxxx"
   }
   ```

## View the attached image in SageMaker AI
<a name="studio-byoi-sdk-view"></a>

After you create the custom SageMaker image and attach it to your domain, the image appears in the **Environment** tab of the domain. You can only view the attached images for shared spaces using the AWS CLI by using the following command.

```
aws sagemaker describe-domain \
    --domain-id <d-xxxxxxxxxxxx>
```

# Launch a Custom SageMaker Image in Amazon SageMaker Studio Classic
<a name="studio-byoi-launch"></a>

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

After you create your custom SageMaker image and attach it to your domain or shared space, the custom image and kernel appear in selectors in the **Change environment** dialog box of the Studio Classic Launcher.

**To launch and select your custom image and kernel**

1. In Amazon SageMaker Studio Classic, open the Launcher. To open the Launcher, choose **Amazon SageMaker Studio Classic** at the top left of the Studio Classic interface or use the keyboard shortcut `Ctrl + Shift + L`.

   To learn about all the available ways to open the Launcher, see [Use the Amazon SageMaker Studio Classic Launcher](studio-launcher.md)  
![\[SageMaker Studio Classic launcher.\]](http://docs.aws.amazon.com/sagemaker/latest/dg/images/studio/studio-new-launcher.png)

1. In the Launcher, in the **Notebooks and compute resources** section, choose **Change environment**.

1. In the **Change environment** dialog, use the dropdown menus to select your **Image** from the **Custom Image** section, and your **Kernel**, then choose **Select**.

1. In the Launcher, choose **Create notebook** or **Open image terminal**. Your notebook or terminal launches in the selected custom image and kernel.

To change your image or kernel in an open notebook, see [Change the Image or a Kernel for an Amazon SageMaker Studio Classic Notebook](notebooks-run-and-manage-change-image.md).

**Note**  
If you encounter an error when launching the image, check your Amazon CloudWatch logs. The name of the log group is `/aws/sagemaker/studio`. The name of the log stream is `$domainID/$userProfileName/KernelGateway/$appName`.

# Clean Up Resources for Custom Images in Amazon SageMaker Studio Classic
<a name="studio-byoi-cleanup"></a>

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

The following sections show how to clean up the resources you created in the previous sections from the SageMaker AI console or AWS CLI. You perform the following steps to clean up the resources:
+ Detach the image and image versions from your domain.
+ Delete the image, image version, and app image config.
+ Delete the container image and repository from Amazon ECR. For more information, see [Deleting a repository](https://docs.aws.amazon.com/AmazonECR/latest/userguide/repository-delete.html).

## Clean up resources from the SageMaker AI console
<a name="studio-byoi-detach"></a>

The following section shows how to clean up resources from the SageMaker AI console.

When you detach an image from a domain, all versions of the image are detached. When an image is detached, all users of the domain lose access to the image versions. A running notebook that has a kernel session on an image version when the version is detached, continues to run. When the notebook is stopped or the kernel is shut down, the image version becomes unavailable.

**To detach an image**

1. Open the Amazon SageMaker AI console at [https://console.aws.amazon.com/sagemaker/](https://console.aws.amazon.com/sagemaker/).

1. On the left navigation pane, choose **Admin configurations**.

1. Under **Admin configurations**, choose **Images**. 

1. Under **Custom SageMaker Studio Classic images attached to domain**, choose the image and then choose **Detach**.

1. (Optional) To delete the image and all versions from SageMaker AI, select **Also delete the selected images ...**. This does not delete the associated container images from Amazon ECR.

1. Choose **Detach**.

## Clean up resources from the AWS CLI
<a name="studio-byoi-sdk-cleanup"></a>

The following section shows how to clean up resources from the AWS CLI.

**To clean up resources**

1. Detach the image and image versions from your domain by passing an empty custom image list to the domain. Open the `default-user-settings.json` file you created in [Attach the SageMaker image to your current domain](studio-byoi-attach.md#studio-byoi-sdk-attach-current-domain). To detach the image and image version from a shared space, open the `default-space-settings.json` file.

1. Delete the custom images and then save the file.

   ```
   "DefaultUserSettings": {
     "KernelGatewayAppSettings": {
        "CustomImages": [
        ],
        ...
     },
     ...
   }
   ```

1. Use the domain ID and default user settings file to update your domain. To update your shared space, use the default space settings file.

   ```
   aws sagemaker update-domain \
       --domain-id <d-xxxxxxxxxxxx> \
       --cli-input-json file://default-user-settings.json
   ```

   The response should look similar to the following.

   ```
   {
       "DomainArn": "arn:aws:sagemaker:us-east-2:acct-id:domain/d-xxxxxxxxxxxx"
   }
   ```

1. Delete the app image config.

   ```
   aws sagemaker delete-app-image-config \
       --app-image-config-name custom-image-config
   ```

1. Delete the SageMaker image, which also deletes all image versions. The container images in ECR that are represented by the image versions are not deleted.

   ```
   aws sagemaker delete-image \
       --image-name custom-image
   ```

# Use Lifecycle Configurations to Customize Amazon SageMaker Studio Classic
<a name="studio-lcc"></a>

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

Amazon SageMaker Studio Classic triggers lifecycle configurations shell scripts during important lifecycle events, such as starting a new Studio Classic notebook. You can use lifecycle configurations to automate customization for your Studio Classic environment. This customization includes installing custom packages, configuring notebook extensions, preloading datasets, and setting up source code repositories.

Using lifecycle configurations gives you flexibility and control to configure Studio Classic to meet your specific needs. For example, you can use customized container images with lifecycle configuration scripts to modify your environment. First, create a minimal set of base container images, then install the most commonly used packages and libraries in those images. After you have completed your images, use lifecycle configurations to install additional packages for specific use cases. This gives you the flexibility to modify your environment across your data science and machine learning teams based on need.

Users can only select lifecycle configuration scripts that they are given access to. While you can give access to multiple lifecycle configuration scripts, you can also set default lifecycle configuration scripts for resources. Based on the resource that the default lifecycle configuration is set for, the default either runs automatically or is the first option shown.

For example lifecycle configuration scripts, see the [Studio Classic Lifecycle Configuration examples GitHub repository](https://github.com/aws-samples/sagemaker-studio-lifecycle-config-examples). For a blog on implementing lifecycle configuration, see [Customize Amazon SageMaker Studio Classic using Lifecycle Configurations](https://aws.amazon.com/blogs/machine-learning/customize-amazon-sagemaker-studio-using-lifecycle-configurations/).

**Note**  
Each script has a limit of **16384 characters**.

**Topics**
+ [Create and Associate a Lifecycle Configuration with Amazon SageMaker Studio Classic](studio-lcc-create.md)
+ [Set Default Lifecycle Configurations for Amazon SageMaker Studio Classic](studio-lcc-defaults.md)
+ [Debug Lifecycle Configurations in Amazon SageMaker Studio Classic](studio-lcc-debug.md)
+ [Update and Detach Lifecycle Configurations in Amazon SageMaker Studio Classic](studio-lcc-delete.md)

# Create and Associate a Lifecycle Configuration with Amazon SageMaker Studio Classic
<a name="studio-lcc-create"></a>

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

Amazon SageMaker AI provides interactive applications that enable Studio Classic's visual interface, code authoring, and run experience. This series shows how to create a lifecycle configuration and associate it with a SageMaker AI domain.

Application types can be either `JupyterServer` or `KernelGateway`. 
+ **`JupyterServer` applications:** This application type enables access to the visual interface for Studio Classic. Every user and shared space in Studio Classic gets its own JupyterServer application.
+ **`KernelGateway` applications:** This application type enables access to the code run environment and kernels for your Studio Classic notebooks and terminals. For more information, see [Jupyter Kernel Gateway](https://jupyter-kernel-gateway.readthedocs.io/en/latest/).

For more information about Studio Classic's architecture and Studio Classic applications, see [Use Amazon SageMaker Studio Classic Notebooks](https://docs.aws.amazon.com/sagemaker/latest/dg/notebooks.html).

**Topics**
+ [Create a Lifecycle Configuration from the AWS CLI for Amazon SageMaker Studio Classic](studio-lcc-create-cli.md)
+ [Create a Lifecycle Configuration from the SageMaker AI Console for Amazon SageMaker Studio Classic](studio-lcc-create-console.md)

# Create a Lifecycle Configuration from the AWS CLI for Amazon SageMaker Studio Classic
<a name="studio-lcc-create-cli"></a>

**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 AI resources](security_iam_id-based-policy-examples.md#grant-tagging-permissions).  
[AWS managed policies for Amazon SageMaker AI](security-iam-awsmanpol.md) that give permissions to create SageMaker resources already include permissions to add tags while creating those resources.

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

The following topic shows how to create a lifecycle configuration using the AWS CLI to automate customization for your Studio Classic environment.

## Prerequisites
<a name="studio-lcc-create-cli-prerequisites"></a>

Before you begin, complete the following prerequisites: 
+ Update the AWS CLI by following the steps in [Installing the current AWS CLI Version](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv1.html#install-tool-bundled).
+ From your local machine, run `aws configure` and provide your AWS credentials. For information about AWS credentials, see [Understanding and getting your AWS credentials](https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html). 
+ Onboard to SageMaker AI domain by following the steps in [Amazon SageMaker AI domain overview](gs-studio-onboard.md).

## Step 1: Create a lifecycle configuration
<a name="studio-lcc-create-cli-step1"></a>

The following procedure shows how to create a lifecycle configuration script that prints `Hello World`.

**Note**  
Each script can have up to **16,384 characters**.

1. From your local machine, create a file named `my-script.sh` with the following content.

   ```
   #!/bin/bash
   set -eux
   echo 'Hello World!'
   ```

1. Convert your `my-script.sh` file into base64 format. This requirement prevents errors that occur from spacing and line break encoding.

   ```
   LCC_CONTENT=`openssl base64 -A -in my-script.sh`
   ```

1. Create a lifecycle configuration for use with Studio Classic. The following command creates a lifecycle configuration that runs when you launch an associated `KernelGateway` application. 

   ```
   aws sagemaker create-studio-lifecycle-config \
   --region region \
   --studio-lifecycle-config-name my-studio-lcc \
   --studio-lifecycle-config-content $LCC_CONTENT \
   --studio-lifecycle-config-app-type KernelGateway
   ```

   Note the ARN of the newly created lifecycle configuration that is returned. This ARN is required to attach the lifecycle configuration to your application.

## Step 2: Attach the lifecycle configuration to your domain, user profile, or shared space
<a name="studio-lcc-create-cli-step2"></a>

To attach the lifecycle configuration, you must update the `UserSettings` for your domain or user profile, or the `SpaceSettings` for a shared space. Lifecycle configuration scripts that are associated at the domain level are inherited by all users. However, scripts that are associated at the user profile level are scoped to a specific user, while scripts that are associated at the shared space level are scoped to the shared space. 

The following example shows how to create a new user profile with the lifecycle configuration attached. You can also create a new domain or space with a lifecycle configuration attached by using the [create-domain](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/sagemaker/create-domain.html) and [create-space](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/sagemaker/create-space.html) commands, respectively.

Add the lifecycle configuration ARN from the previous step to the settings for the appropriate app type. For example, place it in the `JupyterServerAppSettings` of the user. You can add multiple lifecycle configurations at the same time by passing a list of lifecycle configurations. When a user launches a JupyterServer application with the AWS CLI, they can pass a lifecycle configuration to use instead of the default. The lifecycle configuration that the user passes must belong to the list of lifecycle configurations in `JupyterServerAppSettings`.

```
# Create a new UserProfile
aws sagemaker create-user-profile --domain-id domain-id \
--user-profile-name user-profile-name \
--region region \
--user-settings '{
"JupyterServerAppSettings": {
  "LifecycleConfigArns":
    [lifecycle-configuration-arn-list]
  }
}'
```

The following example shows how to update an existing shared space to attach the lifecycle configuration. You can also update an existing domain or user profile with a lifecycle configuration attached by using the [update-domain](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/sagemaker/update-domain.html) or [update-user-profile](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/sagemaker/update-user-profile.html) command. When you update the list of lifecycle configurations attached, you must pass all lifecycle configurations as part of the list. If a lifecycle configuration is not part of this list, it will not be attached to the application.

```
aws sagemaker update-space --domain-id domain-id \
--space-name space-name \
--region region \
--space-settings '{
"JupyterServerAppSettings": {
  "LifecycleConfigArns":
    [lifecycle-configuration-arn-list]
  }
}'
```

For information about setting a default lifecycle configuration for a resource, see [Set Default Lifecycle Configurations for Amazon SageMaker Studio Classic](studio-lcc-defaults.md).

## Step 3: Launch application with lifecycle configuration
<a name="studio-lcc-create-cli-step3"></a>

After you attach a lifecycle configuration to a domain, user profile, or space, the user can select it when launching an application with the AWS CLI. This section describes how to launch an application with an attached lifecycle configuration. For information about changing the default lifecycle configuration after launching a JupyterServer application, see [Set Default Lifecycle Configurations for Amazon SageMaker Studio Classic](studio-lcc-defaults.md).

Launch the desired application type using the `create-app` command and specify the lifecycle configuration ARN in the `resource-spec` argument. 
+ The following example shows how to create a `JupyterServer` application with an associated lifecycle configuration. When creating the `JupyterServer`, the `app-name` must be `default`. The lifecycle configuration ARN passed as part of the `resource-spec` parameter must be part of the list of lifecycle configuration ARNs specified in `UserSettings` for your domain or user profile, or `SpaceSettings` for a shared space.

  ```
  aws sagemaker create-app --domain-id domain-id \
  --region region \
  --user-profile-name user-profile-name \
  --app-type JupyterServer \
  --resource-spec LifecycleConfigArn=lifecycle-configuration-arn \
  --app-name default
  ```
+ The following example shows how to create a `KernelGateway` application with an associated lifecycle configuration.

  ```
  aws sagemaker create-app --domain-id domain-id \
  --region region \
  --user-profile-name user-profile-name \
  --app-type KernelGateway \
  --resource-spec LifecycleConfigArn=lifecycle-configuration-arn,SageMakerImageArn=sagemaker-image-arn,InstanceType=instance-type \
  --app-name app-name
  ```

# Create a Lifecycle Configuration from the SageMaker AI Console for Amazon SageMaker Studio Classic
<a name="studio-lcc-create-console"></a>

**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 AI resources](security_iam_id-based-policy-examples.md#grant-tagging-permissions).  
[AWS managed policies for Amazon SageMaker AI](security-iam-awsmanpol.md) that give permissions to create SageMaker resources already include permissions to add tags while creating those resources.

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

The following topic shows how to create a lifecycle configuration from the Amazon SageMaker AI console to automate customization for your Studio Classic environment.

## Prerequisites
<a name="studio-lcc-create-console-prerequisites"></a>

Before you can begin this tutorial, complete the following prerequisite:
+ Onboard to Amazon SageMaker Studio Classic. For more information, see [Onboard to Amazon SageMaker Studio Classic](https://docs.aws.amazon.com/sagemaker/latest/dg/gs-studio-onboard.html).

## Step 1: Create a new lifecycle configuration
<a name="studio-lcc-create-console-step1"></a>

You can create a lifecycle configuration by entering a script from the Amazon SageMaker AI console.

**Note**  
Each script can have up to **16,384 characters**.

The following procedure shows how to create a lifecycle configuration script that prints `Hello World`.

1. Open the Amazon SageMaker AI console at [https://console.aws.amazon.com/sagemaker/](https://console.aws.amazon.com/sagemaker/).

1. On the left navigation pane, choose **Admin configurations**.

1. Under **Admin configurations**, choose **Lifecycle configurations**. 

1. Choose the **Studio** tab.

1. Choose **Create configuration**.

1. Under **Select configuration type**, select the type of application that the lifecycle configuration should be attached to. For more information about selecting which application to attach the lifecycle configuration to, see [Set Default Lifecycle Configurations for Amazon SageMaker Studio Classic](studio-lcc-defaults.md).

1. Choose **Next**.

1. In the section called **Configuration settings**, enter a name for your lifecycle configuration.

1. In the **Scripts** section, enter the following content.

   ```
   #!/bin/bash
   set -eux
   echo 'Hello World!'
   ```

1. (Optional) Create a tag for your lifecycle configuration.

1. Choose **Submit**.

## Step 2: Attach the lifecycle configuration to a domain or user profile
<a name="studio-lcc-create-console-step2"></a>

Lifecycle configuration scripts associated at the domain level are inherited by all users. However, scripts that are associated at the user profile level are scoped to a specific user. 

You can attach multiple lifecycle configurations to a domain or user profile for both JupyterServer and KernelGateway applications.

**Note**  
To attach a lifecycle configuration to a shared space, you must use the AWS CLI. For more information, see [Create a Lifecycle Configuration from the AWS CLI for Amazon SageMaker Studio Classic](studio-lcc-create-cli.md).

The following sections show how to attach a lifecycle configuration to your domain or user profile.

### Attach to a domain
<a name="studio-lcc-create-console-step2-domain"></a>

The following shows how to attach a lifecycle configuration to your existing domain from the SageMaker AI console.

1. Open the Amazon SageMaker AI console at [https://console.aws.amazon.com/sagemaker/](https://console.aws.amazon.com/sagemaker/).

1. On the left navigation pane, choose **Admin configurations**.

1. Under **Admin configurations**, choose **domains**. 

1. From the list of domains, select the domain to attach the lifecycle configuration to.

1. From the **Domain details**, choose the **Environment** tab.

1. Under **Lifecycle configurations for personal Studio apps**, choose **Attach**.

1. Under **Source**, choose **Existing configuration**.

1. Under **Studio lifecycle configurations**, select the lifecycle configuration that you created in the previous step.

1. Select **Attach to domain**.

### Attach to your user profile
<a name="studio-lcc-create-console-step2-userprofile"></a>

The following shows how to attach a lifecycle configuration to your existing user profile.

1. Open the Amazon SageMaker AI console at [https://console.aws.amazon.com/sagemaker/](https://console.aws.amazon.com/sagemaker/).

1. On the left navigation pane, choose **Admin configurations**.

1. Under **Admin configurations**, choose **domains**. 

1. From the list of domains, select the domain that contains the user profile to attach the lifecycle configuration to.

1. Under **User profiles**, select the user profile.

1. From the **User Details** page, choose **Edit**.

1. On the left navigation, choose **Studio settings**.

1. Under **Lifecycle configurations attached to user**, choose **Attach**.

1. Under **Source**, choose **Existing configuration**.

1. Under **Studio lifecycle configurations**, select the lifecycle configuration that you created in the previous step.

1. Choose **Attach to user profile**.

## Step 3: Launch an application with the lifecycle configuration
<a name="studio-lcc-create-console-step3"></a>

After you attach a lifecycle configuration to a domain or user profile, you can launch an application with that attached lifecycle configuration. Choosing which lifecycle configuration to launch with depends on the application type.
+ **JupyterServer**: When launching a JupyterServer application from the console, SageMaker AI always uses the default lifecycle configuration. You can't use a different lifecycle configuration when launching from the console. For information about changing the default lifecycle configuration after launching a JupyterServer application, see [Set Default Lifecycle Configurations for Amazon SageMaker Studio Classic](studio-lcc-defaults.md).

  To select a different attached lifecycle configuration, you must launch with the AWS CLI. For more information about launching a JupyterServer application with an attached lifecycle configuration from the AWS CLI, see [Create a Lifecycle Configuration from the AWS CLI for Amazon SageMaker Studio Classic](studio-lcc-create-cli.md).
+ **KernelGateway**: You can select any of the attached lifecycle configurations when launching a KernelGateway application using the Studio Classic Launcher.

The following procedure describes how to launch a KernelGateway application with an attached lifecycle configuration from the SageMaker AI console.

1. Open the Amazon SageMaker AI console at [https://console.aws.amazon.com/sagemaker/](https://console.aws.amazon.com/sagemaker/).

1. Launch Studio Classic. For more information, see [Launch Amazon SageMaker Studio Classic](studio-launch.md).

1. In the Studio Classic UI, open the Studio Classic Launcher. For more information, see [Use the Amazon SageMaker Studio Classic Launcher](studio-launcher.md). 

1. In the Studio Classic Launcher, navigate to the **Notebooks and compute resources** section. 

1. Click the **Change environment** button.

1. On the **Change environment** dialog, use the dropdown menus to select your **Image**, **Kernel**, **Instance type**, and a **Start-up script**. If there is no default lifecycle configuration, the **Start-up script** value defaults to `No script`. Otherwise, the **Start-up script** value is your default lifecycle configuration. After you select a lifecycle configuration, you can view the entire script.

1. Click **Select**.

1. Back to the Launcher, click the **Create notebook** to launch a new notebook kernel with your selected image and lifecycle configuration.

## Step 4: View logs for a lifecycle configuration
<a name="studio-lcc-create-console-step4"></a>

You can view the logs for your lifecycle configuration after it has been attached to a domain or user profile. 

1. First, provide access to CloudWatch for your AWS Identity and Access Management (IAM) role. Add read permissions for the following log group and log stream.
   + **Log group:**`/aws/sagemaker/studio`
   + **Log stream:**`domain/user-profile/app-type/app-name/LifecycleConfigOnStart`

    For information about adding permissions, see [Enabling logging from certain AWS services](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AWS-logs-and-resource-policy.html).

1. From within Studio Classic, navigate to the **Running Terminals and Kernels** icon (![\[Black square icon representing a placeholder or empty image.\]](http://docs.aws.amazon.com/sagemaker/latest/dg/images/studio/icons/running-terminals-kernels.png)) to monitor your lifecycle configuration.

1. Select an application from the list of running applications. Applications with attached lifecycle configurations have an attached indicator icon ![\[Code brackets symbol representing programming or markup languages.\]](http://docs.aws.amazon.com/sagemaker/latest/dg/images/studio/studio-lcc-indicator-icon.png).

1. Select the indicator icon for your application. This opens a new panel that lists the lifecycle configuration.

1. From the new panel, select `View logs`. This opens a new tab that displays the logs.

# Set Default Lifecycle Configurations for Amazon SageMaker Studio Classic
<a name="studio-lcc-defaults"></a>

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

Although you can attach multiple lifecycle configuration scripts to a single resource, you can only set one default lifecycle configuration for each JupyterServer or KernelGateway application. The behavior of the default lifecycle configuration depends on whether it is set for JupyterServer or KernelGateway apps. 
+ **JupyterServer apps:** When set as the default lifecycle configuration script for JupyterServer apps, the lifecycle configuration script runs automatically when the user signs in to Studio Classic for the first time or restarts Studio Classic. Use this default lifecycle configuration to automate one-time setup actions for the Studio Classic developer environment, such as installing notebook extensions or setting up a GitHub repo. For an example of this, see [Customize Amazon SageMaker Studio using Lifecycle Configurations](https://aws.amazon.com/blogs/machine-learning/customize-amazon-sagemaker-studio-using-lifecycle-configurations/).
+ **KernelGateway apps:** When set as the default lifecycle configuration script for KernelGateway apps, the lifecycle configuration is selected by default in the Studio Classic launcher. Users can launch a notebook or terminal with the default script selected, or they can select a different one from the list of lifecycle configurations.

SageMaker AI supports setting a default lifecycle configuration for the following resources:
+ Domains
+ User profiles
+ Shared spaces

While domains and user profiles support setting a default lifecycle configuration from both the Amazon SageMaker AI console and AWS Command Line Interface, shared spaces only support setting a default lifecycle configuration from the AWS CLI.

You can set a lifecycle configuration as the default when creating a new resource or updating an existing resource. The following topics demonstrate how to set a default lifecycle configuration using the SageMaker AI console and AWS CLI.

## Default lifecycle configuration inheritance
<a name="studio-lcc-defaults-inheritance"></a>

Default lifecycle configurations set at the *domain* level are inherited by all users and shared spaces. Default lifecycle configurations set at the *user* and *shared space* level are scoped to only that user or shared space. User and space defaults override defaults set at the domain level.

A default KernelGateway lifecycle configuration set for a domain applies to all KernelGateway applications launched in the domain. Unless the user selects a different lifecycle configuration from the list presented in the Studio Classic launcher, the default lifecycle configuration is used. The default script also runs if `No Script` is selected by the user. For more information about selecting a script, see [Step 3: Launch an application with the lifecycle configuration](studio-lcc-create-console.md#studio-lcc-create-console-step3).

**Topics**
+ [Default lifecycle configuration inheritance](#studio-lcc-defaults-inheritance)
+ [Set Defaults from the AWS CLI for Amazon SageMaker Studio Classic](studio-lcc-defaults-cli.md)
+ [Set Defaults from the SageMaker AI Console for Amazon SageMaker Studio Classic](studio-lcc-defaults-console.md)

# Set Defaults from the AWS CLI for Amazon SageMaker Studio Classic
<a name="studio-lcc-defaults-cli"></a>

**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 AI resources](security_iam_id-based-policy-examples.md#grant-tagging-permissions).  
[AWS managed policies for Amazon SageMaker AI](security-iam-awsmanpol.md) that give permissions to create SageMaker resources already include permissions to add tags while creating those resources.

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

You can set default lifecycle configuration scripts from the AWS CLI for the following resources:
+ Domains
+ User profiles
+ Shared spaces

The following sections outline how to set default lifecycle configuration scripts from the AWS CLI.

**Topics**
+ [Prerequisites](#studio-lcc-defaults-cli-prereq)
+ [Set a default lifecycle configuration when creating a new resource](#studio-lcc-defaults-cli-new)
+ [Set a default lifecycle configuration for an existing resource](#studio-lcc-defaults-cli-existing)

## Prerequisites
<a name="studio-lcc-defaults-cli-prereq"></a>

Before you begin, complete the following prerequisites:
+ Update the AWS CLI by following the steps in [Installing the current AWS CLI version](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv1.html#install-tool-bundled).
+ From your local machine, run `aws configure` and provide your AWS credentials. For information about AWS credentials, see [Understanding and getting your AWS credentials](https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html). 
+ Onboard to SageMaker AI domain by following the steps in [Amazon SageMaker AI domain overview](gs-studio-onboard.md).
+ Create a lifecycle configuration following the steps in [Create and Associate a Lifecycle Configuration with Amazon SageMaker Studio Classic](studio-lcc-create.md).

## Set a default lifecycle configuration when creating a new resource
<a name="studio-lcc-defaults-cli-new"></a>

To set a default lifecycle configuration when creating a new domain, user profile, or space, pass the ARN of your previously created lifecycle configuration as part of one of the following AWS CLI commands:
+ [create-user-profile](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/sagemaker/create-user-profile.html)
+ [create-domain](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/opensearch/create-domain.html)
+ [create-space](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/sagemaker/create-space.html)

You must pass the lifecycle configuration ARN for the following values in the KernelGateway or JupyterServer default settings:
+ `DefaultResourceSpec`:`LifecycleConfigArn` - This specifies the default lifecycle configuration for the application type.
+ `LifecycleConfigArns` - This is the list of all lifecycle configurations attached to the application type. The default lifecycle configuration must also be part of this list.

For example, the following API call creates a new user profile with a default lifecycle configuration.

```
aws sagemaker create-user-profile --domain-id domain-id \
--user-profile-name user-profile-name \
--region region \
--user-settings '{
"KernelGatewayAppSettings": {
    "DefaultResourceSpec": { 
            "InstanceType": "ml.t3.medium",
            "LifecycleConfigArn": "lifecycle-configuration-arn"
         },
    "LifecycleConfigArns": [lifecycle-configuration-arn-list]
  }
}'
```

## Set a default lifecycle configuration for an existing resource
<a name="studio-lcc-defaults-cli-existing"></a>

To set or update the default lifecycle configuration for an existing resource, pass the ARN of your previously created lifecycle configuration as part of one of the following AWS CLI commands:
+ [update-user-profile](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/sagemaker/update-user-profile.html)
+ [update-domain](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/sagemaker/update-domain.html)
+ [update-space](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/sagemaker/update-space.html)

You must pass the lifecycle configuration ARN for the following values in the KernelGateway or JupyterServer default settings:
+ `DefaultResourceSpec`:`LifecycleConfigArn` - This specifies the default lifecycle configuration for the application type.
+ `LifecycleConfigArns` - This is the list of all lifecycle configurations attached to the application type. The default lifecycle configuration must also be part of this list.

For example, the following API call updates a user profile with a default lifecycle configuration.

```
aws sagemaker update-user-profile --domain-id domain-id \
--user-profile-name user-profile-name \
--region region \
--user-settings '{
"KernelGatewayAppSettings": {
    "DefaultResourceSpec": {
            "InstanceType": "ml.t3.medium",
            "LifecycleConfigArn": "lifecycle-configuration-arn"
         },
    "LifecycleConfigArns": [lifecycle-configuration-arn-list]
  }
}'
```

The following API call updates a domain to set a new default lifecycle configuration.

```
aws sagemaker update-domain --domain-id domain-id \
--region region \
--default-user-settings '{
"JupyterServerAppSettings": {
    "DefaultResourceSpec": {
            "InstanceType": "system",
            "LifecycleConfigArn": "lifecycle-configuration-arn"
         },
    "LifecycleConfigArns": [lifecycle-configuration-arn-list]
  }
}'
```

# Set Defaults from the SageMaker AI Console for Amazon SageMaker Studio Classic
<a name="studio-lcc-defaults-console"></a>

**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 AI resources](security_iam_id-based-policy-examples.md#grant-tagging-permissions).  
[AWS managed policies for Amazon SageMaker AI](security-iam-awsmanpol.md) that give permissions to create SageMaker resources already include permissions to add tags while creating those resources.

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

You can set default lifecycle configuration scripts from the SageMaker AI console for the following resources.
+ Domains
+ User profiles

You cannot set default lifecycle configuration scripts for shared spaces from the SageMaker AI console. For information about setting defaults for shared spaces, see [Set Defaults from the AWS CLI for Amazon SageMaker Studio Classic](studio-lcc-defaults-cli.md).

The following sections outline how to set default lifecycle configuration scripts from the SageMaker AI console.

**Topics**
+ [Prerequisites](#studio-lcc-defaults-cli-prerequisites)
+ [Set a default lifecycle configuration for a domain](#studio-lcc-defaults-cli-domain)
+ [Set a default lifecycle configuration for a user profile](#studio-lcc-defaults-cli-user-profile)

## Prerequisites
<a name="studio-lcc-defaults-cli-prerequisites"></a>

Before you begin, complete the following prerequisites:
+ Onboard to SageMaker AI domain by following the steps in [Amazon SageMaker AI domain overview](gs-studio-onboard.md).
+ Create a lifecycle configuration following the steps in [Create and Associate a Lifecycle Configuration with Amazon SageMaker Studio Classic](studio-lcc-create.md).

## Set a default lifecycle configuration for a domain
<a name="studio-lcc-defaults-cli-domain"></a>

The following procedure shows how to set a default lifecycle configuration for a domain from the SageMaker AI console.

1. Open the Amazon SageMaker AI console at [https://console.aws.amazon.com/sagemaker/](https://console.aws.amazon.com/sagemaker/).

1. From the list of domains, select the name of the domain to set the default lifecycle configuration for.

1. From the **Domain details** page, choose the **Environment** tab.

1. Under **Lifecycle configurations for personal Studio apps**, select the lifecycle configuration that you want to set as the default for the domain. You can set distinct defaults for JupyterServer and KernelGateway applications.

1. Choose **Set as default**. This opens a pop up window that lists the current defaults for JupyterServer and KernelGateway applications.

1. Choose **Set as default** to set the lifecycle configuration as the default for its respective application type.

## Set a default lifecycle configuration for a user profile
<a name="studio-lcc-defaults-cli-user-profile"></a>

The following procedure shows how to set a default lifecycle configuration for a user profile from the SageMaker AI console.

1. Open the Amazon SageMaker AI console at [https://console.aws.amazon.com/sagemaker/](https://console.aws.amazon.com/sagemaker/).

1. From the list of domains, select the name of the domain that contains the user profile that you want to set the default lifecycle configuration for.

1. From the **Domain details** page, choose the **User profiles** tab.

1. Select the name of the user profile to set the default lifecycle configuration for. This opens a **User Details** page.

1. From the **User Details** page, choose **Edit**. This opens an **Edit user profile** page.

1. From the **Edit user profile** page, choose **Step 2 Studio settings**.

1. Under **Lifecycle configurations attached to user**, select the lifecycle configuration that you want to set as the default for the user profile. You can set distinct defaults for JupyterServer and KernelGateway applications.

1. Choose **Set as default**. This opens a pop up window that lists the current defaults for JupyterServer and KernelGateway applications.

1. Choose **Set as default** to set the lifecycle configuration as the default for its respective application type.

# Debug Lifecycle Configurations in Amazon SageMaker Studio Classic
<a name="studio-lcc-debug"></a>

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

The following topics show how to get information about and debug your lifecycle configurations.

**Topics**
+ [Verify lifecycle configuration process from CloudWatch Logs](#studio-lcc-debug-logs)
+ [JupyterServer app failure](#studio-lcc-debug-jupyterserver)
+ [KernelGateway app failure](#studio-lcc-debug-kernel)
+ [Lifecycle configuration timeout](#studio-lcc-debug-timeout)

## Verify lifecycle configuration process from CloudWatch Logs
<a name="studio-lcc-debug-logs"></a>

Lifecycle configurations only log `STDOUT` and `STDERR`.

`STDOUT` is the default output for bash scripts. You can write to `STDERR` by appending `>&2` to the end of a bash command. For example, `echo 'hello'>&2`. 

Logs for your lifecycle configurations are published to your AWS account using Amazon CloudWatch. These logs can be found in the `/aws/sagemaker/studio` log stream in the CloudWatch console.

1. Open the CloudWatch console at [https://console.aws.amazon.com/cloudwatch/](https://console.aws.amazon.com/cloudwatch/).

1. Choose **Logs** from the left side. From the dropdown menu, select **Log groups**.

1. On the **Log groups** page, search for `aws/sagemaker/studio`. 

1. Select the log group.

1. On the **Log group details** page, choose the **Log streams** tab.

1. To find the logs for a specific app, search the log streams using the following format:

   ```
   domain-id/space-name/app-type/default/LifecycleConfigOnStart
   ```

   For example, to find the lifecycle configuration logs for domain `d-m85lcu8vbqmz`, space name `i-sonic-js`, and application type `JupyterLab`, use the following search string:

   ```
   d-m85lcu8vbqmz/i-sonic-js/JupyterLab/default/LifecycleConfigOnStart
   ```

## JupyterServer app failure
<a name="studio-lcc-debug-jupyterserver"></a>

If your JupyterServer app crashes because of an issue with the attached lifecycle configuration, Studio Classic displays the following error message on the Studio Classic startup screen. 

```
Failed to create SageMaker Studio due to start-up script failure
```

Select the `View script logs` link to view the CloudWatch logs for your JupyterServer app.

In the case where the faulty lifecycle configuration is specified in the `DefaultResourceSpec` of your domain, user profile, or shared space, Studio Classic continues to use the lifecycle configuration even after restarting Studio Classic. 

To resolve this error, follow the steps in [Set Default Lifecycle Configurations for Amazon SageMaker Studio Classic](studio-lcc-defaults.md) to remove the lifecycle configuration script from the `DefaultResourceSpec` or select another script as the default. Then launch a new JupyterServer app.

## KernelGateway app failure
<a name="studio-lcc-debug-kernel"></a>

If your KernelGateway app crashes because of an issue with the attached lifecycle configuration, Studio Classic displays the error message in your Studio Classic Notebook. 

Choose `View script logs` to view the CloudWatch logs for your KernelGateway app.

In this case, your lifecycle configuration is specified in the Studio Classic Launcher when launching a new Studio Classic Notebook. 

To resolve this error, use the Studio Classic launcher to select a different lifecycle configuration or select `No script`.

**Note**  
A default KernelGateway lifecycle configuration specified in `DefaultResourceSpec` applies to all KernelGateway images in the domain, user profile, or shared space unless the user selects a different script from the list presented in the Studio Classic launcher. The default script also runs if `No Script` is selected by the user. For more information on selecting a script, see [Step 3: Launch an application with the lifecycle configuration](studio-lcc-create-console.md#studio-lcc-create-console-step3).

## Lifecycle configuration timeout
<a name="studio-lcc-debug-timeout"></a>

There is a lifecycle configuration timeout limitation of 5 minutes. If a lifecycle configuration script takes longer than 5 minutes to run, Studio Classic throws an error.

To resolve this error, ensure that your lifecycle configuration script completes in less than 5 minutes. 

To help decrease the run time of scripts, try the following:
+ Cut down on necessary steps. For example, limit which conda environments to install large packages in.
+ Run tasks in parallel processes.
+ Use the `nohup` command in your script to ensure that hangup signals are ignored and do not stop the execution of the script.

# Update and Detach Lifecycle Configurations in Amazon SageMaker Studio Classic
<a name="studio-lcc-delete"></a>

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

A lifecycle configuration script can't be changed after it's created. To update your script, you must create a new lifecycle configuration script and attach it to the respective domain, user profile, or shared space. For more information about creating and attaching the lifecycle configuration, see [Create and Associate a Lifecycle Configuration with Amazon SageMaker Studio Classic](studio-lcc-create.md).

The following topic shows how to detach a lifecycle configuration using the AWS CLI and SageMaker AI console.

**Topics**
+ [Prerequisites](#studio-lcc-delete-pre)
+ [Detach using the AWS CLI](#studio-lcc-delete-cli)

## Prerequisites
<a name="studio-lcc-delete-pre"></a>

Before detaching a lifecycle configuration, you must complete the following prerequisite.
+ To successfully detach a lifecycle configuration, no running application can be using the lifecycle configuration. You must first shut down the running applications as shown in [Shut Down and Update Amazon SageMaker Studio Classic and Apps](studio-tasks-update.md).

## Detach using the AWS CLI
<a name="studio-lcc-delete-cli"></a>

To detach a lifecycle configuration using the AWS CLI, remove the desired lifecycle configuration from the list of lifecycle configurations attached to the resource and pass the list as part of the respective command:
+ [update-user-profile](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/sagemaker/update-user-profile.html)
+ [update-domain](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/sagemaker/update-domain.html)
+ [update-space](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/sagemaker/update-space.html)

For example, the following command removes all lifecycle configurations for KernelGateways attached to the domain.

```
aws sagemaker update-domain --domain-id domain-id \
--region region \
--default-user-settings '{
"KernelGatewayAppSettings": {
  "LifecycleConfigArns":
    []
  }
}'
```

# Attach Suggested Git Repos to Amazon SageMaker Studio Classic
<a name="studio-git-attach"></a>

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

Amazon SageMaker Studio Classic offers a Git extension for you to enter the URL of a Git repository (repo), clone it into your environment, push changes, and view commit history. In addition to this Git extension, you can also attach suggested Git repository URLs at the Amazon SageMaker AI domain or user profile level. Then, you can select the repo URL from the list of suggestions and clone that into your environment using the Git extension in Studio Classic. 

The following topics show how to attach Git repo URLs to a domain or user profile from the AWS CLI and SageMaker AI console. You'll also learn how to detach these repository URLs.

**Topics**
+ [Attach a Git Repository from the AWS CLI for Amazon SageMaker Studio Classic](studio-git-attach-cli.md)
+ [Attach a Git Repository from the SageMaker AI Console for Amazon SageMaker Studio Classic](studio-git-attach-console.md)
+ [Detach Git Repos from Amazon SageMaker Studio Classic](studio-git-detach.md)

# Attach a Git Repository from the AWS CLI for Amazon SageMaker Studio Classic
<a name="studio-git-attach-cli"></a>

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

The following topic shows how to attach a Git repository URL using the AWS CLI, so that Amazon SageMaker Studio Classic automatically suggests it for cloning. After you attach the Git repository URL, you can clone it by following the steps in [Clone a Git Repository in Amazon SageMaker Studio Classic](studio-tasks-git.md).

## Prerequisites
<a name="studio-git-attach-cli-prerequisites"></a>

Before you begin, complete the following prerequisites: 
+ Update the AWS CLI by following the steps in [Installing the current AWS CLI Version](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv1.html#install-tool-bundled).
+ From your local machine, run `aws configure` and provide your AWS credentials. For information about AWS credentials, see [Understanding and getting your AWS credentials](https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html). 
+ Onboard to Amazon SageMaker AI domain. For more information, see [Amazon SageMaker AI domain overview](gs-studio-onboard.md).

## Attach the Git repo to a domain or user profile
<a name="studio-git-attach-cli-attach"></a>

Git repo URLs associated at the domain level are inherited by all users. However, Git repo URLs that are associated at the user profile level are scoped to a specific user. You can attach multiple Git repo URLs to a domain or user profile by passing a list of repository URLs.

The following sections show how to attach a Git repo URL to your domain and user profile.

### Attach to a domain
<a name="studio-git-attach-cli-attach-domain"></a>

The following command attaches a Git repo URL to an existing domain.

```
aws sagemaker update-domain --region region --domain-id domain-id \
    --default-user-settings JupyterServerAppSettings={CodeRepositories=[{RepositoryUrl="repository"}]}
```

### Attach to a user profile
<a name="studio-git-attach-cli-attach-userprofile"></a>

The following shows how to attach a Git repo URL to an existing user profile.

```
aws sagemaker update-user-profile --domain-id domain-id --user-profile-name user-name\
    --user-settings JupyterServerAppSettings={CodeRepositories=[{RepositoryUrl="repository"}]}
```

# Attach a Git Repository from the SageMaker AI Console for Amazon SageMaker Studio Classic
<a name="studio-git-attach-console"></a>

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

The following topic shows how to associate a Git repository URL from the Amazon SageMaker AI console to clone it in your Studio Classic environment. After you associate the Git repository URL, you can clone it by following the steps in [Clone a Git Repository in Amazon SageMaker Studio Classic](studio-tasks-git.md).

## Prerequisites
<a name="studio-git-attach-console-prerequisites"></a>

Before you can begin this tutorial, you must onboard to Amazon SageMaker AI domain. For more information, see [Amazon SageMaker AI domain overview](gs-studio-onboard.md).

## Attach the Git repo to a domain or user profile
<a name="studio-git-attach-console-attach"></a>

Git repo URLs associated at the domain level are inherited by all users. However, Git repo URL that are associated at the user profile level are scoped to a specific user. 

The following sections show how to attach a Git repo URL to a domain and user profile.

### Attach to a domain
<a name="studio-git-attach-console-attach-domain"></a>

**To attach a Git repo URL to an existing domain**

1. Open the Amazon SageMaker AI console at [https://console.aws.amazon.com/sagemaker/](https://console.aws.amazon.com/sagemaker/).

1. On the left navigation pane, choose **Admin configurations**.

1. Under **Admin configurations**, choose **domains**. 

1. Select the domain to attach the Git repo to.

1. On the **domain details** page, choose the **Environment** tab.

1. On the **Suggested code repositories for the domain** tab, choose **Attach**.

1. Under **Source**, enter the Git repository URL.

1. Select **Attach to domain**.

### Attach to a user profile
<a name="studio-git-attach-console-attach-userprofile"></a>

The following shows how to attach a Git repository URL to an existing user profile.

**To attach a Git repository URL to a user profile**

1. Open the Amazon SageMaker AI console at [https://console.aws.amazon.com/sagemaker/](https://console.aws.amazon.com/sagemaker/).

1. On the left navigation pane, choose **Admin configurations**.

1. Under **Admin configurations**, choose **domains**. 

1. Select the domain that includes the user profile to attach the Git repo to.

1. On the **domain details** page, choose the **User profiles** tab.

1. Select the user profile to attach the Git repo URL to.

1. On the **User details** page, choose **Edit**.

1. On the **Studio settings** page, choose **Attach** from the **Suggested code repositories for the user** section.

1. Under **Source**, enter the Git repository URL.

1. Choose **Attach to user**.

# Detach Git Repos from Amazon SageMaker Studio Classic
<a name="studio-git-detach"></a>

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

This guide shows how to detach Git repository URLs from an Amazon SageMaker AI domain or user profile using the AWS CLI or Amazon SageMaker AI console.

**Topics**
+ [Detach a Git repo using the AWS CLI](#studio-git-detach-cli)
+ [Detach the Git repo using the SageMaker AI console](#studio-git-detach-console)

## Detach a Git repo using the AWS CLI
<a name="studio-git-detach-cli"></a>

To detach all Git repo URLs from a domain or user profile, you must pass an empty list of code repositories. This list is passed as part of the `JupyterServerAppSettings` parameter in an `update-domain` or `update-user-profile` command. To detach only one Git repo URL, pass the code repositories list without the desired Git repo URL. This section shows how to detach all Git repo URLs from your domain or user profile using the AWS Command Line Interface (AWS CLI).

### Detach from a domain
<a name="studio-git-detach-cli-domain"></a>

The following command detaches all Git repo URLs from a domain.

```
aws sagemaker update-domain --region region --domain-name domain-name \
    --domain-settings JupyterServerAppSettings={CodeRepositories=[]}
```

### Detach from a user profile
<a name="studio-git-detach-cli-userprofile"></a>

The following command detaches all Git repo URLs from a user profile.

```
aws sagemaker update-user-profile --domain-name domain-name --user-profile-name user-name\
    --user-settings JupyterServerAppSettings={CodeRepositories=[]}
```

## Detach the Git repo using the SageMaker AI console
<a name="studio-git-detach-console"></a>

The following sections show how to detach a Git repo URL from a domain or user profile using the SageMaker AI console.

### Detach from a domain
<a name="studio-git-detach-console-domain"></a>

Use the following steps to detach a Git repo URL from an existing domain.

**To detach a Git repo URL from an existing domain**

1. Open the Amazon SageMaker AI console at [https://console.aws.amazon.com/sagemaker/](https://console.aws.amazon.com/sagemaker/).

1. On the left navigation pane, choose **Admin configurations**.

1. Under **Admin configurations**, choose **domains**. 

1. Select the domain with the Git repo URL that you want to detach.

1. On the **domain details** page, choose the **Environment** tab.

1. On the **Suggested code repositories for the domain** tab, select the Git repository URL to detach.

1. Choose **Detach**.

1. From the new window, choose **Detach**.

### Detach from a user profile
<a name="studio-git-detach-console-userprofile"></a>

Use the following steps to detach a Git repo URL from a user profile.

**To detach a Git repo URL from a user profile**

1. Open the Amazon SageMaker AI console at [https://console.aws.amazon.com/sagemaker/](https://console.aws.amazon.com/sagemaker/).

1. On the left navigation pane, choose **Admin configurations**.

1. Under **Admin configurations**, choose **domains**. 

1. Select the domain that includes the user profile with the Git repo URL that you want to detach.

1. On the **domain details** page, choose the **User profiles** tab.

1. Select the user profile with the Git repo URL that you want to detach.

1. On the **User details** page, choose **Edit**.

1. On the **Studio settings** page, select the Git repo URL to detach from the **Suggested code repositories for the user** tab.

1. Choose **Detach**.

1. From the new window, choose **Detach**.

# Perform Common Tasks in Amazon SageMaker Studio Classic
<a name="studio-tasks"></a>

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

The following sections describe how to perform common tasks in Amazon SageMaker Studio Classic. For an overview of the Studio Classic interface, see [Amazon SageMaker Studio Classic UI Overview](studio-ui.md).

**Topics**
+ [Upload Files to Amazon SageMaker Studio Classic](studio-tasks-files.md)
+ [Clone a Git Repository in Amazon SageMaker Studio Classic](studio-tasks-git.md)
+ [Stop a Training Job in Amazon SageMaker Studio Classic](studio-tasks-stop-training-job.md)
+ [Use TensorBoard in Amazon SageMaker Studio Classic](studio-tensorboard.md)
+ [Use Amazon Q Developer with Amazon SageMaker Studio Classic](sm-q.md)
+ [Manage Your Amazon EFS Storage Volume in Amazon SageMaker Studio Classic](studio-tasks-manage-storage.md)
+ [Provide Feedback on Amazon SageMaker Studio Classic](studio-tasks-provide-feedback.md)
+ [Shut Down and Update Amazon SageMaker Studio Classic and Apps](studio-tasks-update.md)

# Upload Files to Amazon SageMaker Studio Classic
<a name="studio-tasks-files"></a>

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

When you onboard to Amazon SageMaker Studio Classic, a home directory is created for you in the Amazon Elastic File System (Amazon EFS) volume that was created for your team. Studio Classic can only open files that have been uploaded to your directory. The Studio Classic file browser maps to your home directory.

**Note**  
Studio Classic does not support uploading folders. While you can only upload individual files, you can upload multiple files at the same time.

**To upload files to your home directory**

1. In the left sidebar, choose the **File Browser** icon ( ![\[Black square icon representing a placeholder or empty image.\]](http://docs.aws.amazon.com/sagemaker/latest/dg/images/studio/icons/folder.png)).

1. In the file browser, choose the **Upload Files** icon (![\[Black square icon representing a placeholder or empty image.\]](http://docs.aws.amazon.com/sagemaker/latest/dg/images/icons/File_upload_squid.png)).

1. Select the files you want to upload and then choose **Open**.

1. Double-click a file to open the file in a new tab in Studio Classic.

# Clone a Git Repository in Amazon SageMaker Studio Classic
<a name="studio-tasks-git"></a>

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

Amazon SageMaker Studio Classic can only connect only to a local Git repository (repo). This means that you must clone the Git repo from within Studio Classic to access the files in the repo. Studio Classic offers a Git extension for you to enter the URL of a Git repo, clone it into your environment, push changes, and view commit history. If the repo is private and requires credentials to access, then you are prompted to enter your user credentials. This includes your username and personal access token. For more information about personal access tokens, see [Managing your personal access tokens](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens).

Admins can also attach suggested Git repository URLs at the Amazon SageMaker AI domain or user profile level. Users can then select the repo URL from the list of suggestions and clone that into Studio Classic. For more information about attaching suggested repos, see [Attach Suggested Git Repos to Amazon SageMaker Studio Classic](studio-git-attach.md).

The following procedure shows how to clone a GitHub repo from Studio Classic. 

**To clone the repo**

1. In the left sidebar, choose the **Git** icon ( ![\[Black square icon representing a placeholder or empty image.\]](http://docs.aws.amazon.com/sagemaker/latest/dg/images/studio/icons/git.png)).

1. Choose **Clone a Repository**. This opens a new window.

1. In the **Clone Git Repository** window, enter the URL in the following format for the Git repo that you want to clone or select a repository from the list of **Suggested repositories**.

   ```
   https://github.com/path-to-git-repo/repo.git
   ```

1. If you entered the URL of the Git repo manually, select **Clone "*git-url*"** from the dropdown menu.

1. Under **Project directory to clone into**, enter the path to the local directory that you want to clone the Git repo into. If this value is left empty, Studio Classic clones the repo into JupyterLab's root directory.

1. Choose **Clone**. This opens a new terminal window.

1. If the repo requires credentials, you are prompted to enter your username and personal access token. This prompt does not accept passwords, you must use a personal access token. For more information about personal access tokens, see [Managing your personal access tokens](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens).

1. Wait for the download to finish. After the repo has been cloned, the **File Browser** opens to display the cloned repo.

1. Double click the repo to open it.

1. Choose the **Git** icon to view the Git user interface which now tracks the repo.

1. To track a different repo, open the repo in the file browser and then choose the **Git** icon.

# Stop a Training Job in Amazon SageMaker Studio Classic
<a name="studio-tasks-stop-training-job"></a>

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

You can stop a training job with the Amazon SageMaker Studio Classic UI. When you stop a training job, its status changes to `Stopping` at which time billing ceases. An algorithm can delay termination in order to save model artifacts after which the job status changes to `Stopped`. For more information, see the [stop\$1training\$1job](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/sagemaker.html#SageMaker.Client.stop_training_job) method in the AWS SDK for Python (Boto3).

**To stop a training job**

1. Follow the [View experiments and runs](experiments-view-compare.md) procedure on this page until you open the **Describe Trial Component** tab.

1. At the upper-right side of the tab, choose **Stop training job**. The **Status** at the top left of the tab changes to **Stopped**.

1. To view the training time and billing time, choose **AWS Settings**.

# Use TensorBoard in Amazon SageMaker Studio Classic
<a name="studio-tensorboard"></a>

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

 The following doc outlines how to install and run TensorBoard in Amazon SageMaker Studio Classic. 

**Note**  
This guide shows how to open the TensorBoard application through a SageMaker Studio Classic notebook server of an individual SageMaker AI domain user profile. For a more comprehensive TensorBoard experience integrated with SageMaker Training and the access control functionalities of SageMaker AI domain, see [TensorBoard in Amazon SageMaker AI](tensorboard-on-sagemaker.md).

## Prerequisites
<a name="studio-tensorboard-prereq"></a>

This tutorial requires a SageMaker AI domain. For more information, see [Amazon SageMaker AI domain overview](gs-studio-onboard.md)

## Set Up `TensorBoardCallback`
<a name="studio-tensorboard-setup"></a>

1. Launch Studio Classic, and open the Launcher. For more information, see [Use the Amazon SageMaker Studio Classic Launcher](studio-launcher.md)

1. In the Amazon SageMaker Studio Classic Launcher, under `Notebooks and compute resources`, choose the **Change environment** button.

1. On the **Change environment** dialog, use the dropdown menus to select the `TensorFlow 2.6 Python 3.8 CPU Optimized` Studio Classic **Image**.

1. Back to the Launcher, click the **Create notebook** tile. Your notebook launches and opens in a new Studio Classic tab.

1. Run this code from within your notebook cells.

1. Import the required packages. 

   ```
   import os
   import datetime
   import tensorflow as tf
   ```

1. Create a Keras model.

   ```
   mnist = tf.keras.datasets.mnist
   
   (x_train, y_train),(x_test, y_test) = mnist.load_data()
   x_train, x_test = x_train / 255.0, x_test / 255.0
   
   def create_model():
     return tf.keras.models.Sequential([
       tf.keras.layers.Flatten(input_shape=(28, 28)),
       tf.keras.layers.Dense(512, activation='relu'),
       tf.keras.layers.Dropout(0.2),
       tf.keras.layers.Dense(10, activation='softmax')
     ])
   ```

1. Create a directory for your TensorBoard logs

   ```
   LOG_DIR = os.path.join(os.getcwd(), "logs/fit/" + datetime.datetime.now().strftime("%Y%m%d-%H%M%S"))
   ```

1. Run training with TensorBoard.

   ```
   model = create_model()
   model.compile(optimizer='adam',
                 loss='sparse_categorical_crossentropy',
                 metrics=['accuracy'])
                 
                 
   tensorboard_callback = tf.keras.callbacks.TensorBoard(log_dir=LOG_DIR, histogram_freq=1)
   
   model.fit(x=x_train,
             y=y_train,
             epochs=5,
             validation_data=(x_test, y_test),
             callbacks=[tensorboard_callback])
   ```

1. Generate the EFS path for the TensorBoard logs. You use this path to set up your logs from the terminal.

   ```
   EFS_PATH_LOG_DIR = "/".join(LOG_DIR.strip("/").split('/')[1:-1])
   print (EFS_PATH_LOG_DIR)
   ```

   Retrieve the `EFS_PATH_LOG_DIR`. You will need it in the TensorBoard installation section.

## Install TensorBoard
<a name="studio-tensorboard-install"></a>

1. Click on the  `Amazon SageMaker Studio Classic` button on the top left corner of Studio Classic to open the Amazon SageMaker Studio Classic Launcher. This launcher must be opened from your root directory. For more information, see [Use the Amazon SageMaker Studio Classic Launcher](studio-launcher.md)

1. In the Launcher, under `Utilities and files`, click `System terminal`. 

1. From the terminal, run the following commands. Copy `EFS_PATH_LOG_DIR` from the Jupyter notebook. You must run this from the `/home/sagemaker-user` root directory.

   ```
   pip install tensorboard
   tensorboard --logdir <EFS_PATH_LOG_DIR>
   ```

## Launch TensorBoard
<a name="studio-tensorboard-launch"></a>

1. To launch TensorBoard, copy your Studio Classic URL and replace `lab?` with `proxy/6006/` as follows. You must include the trailing `/` character.

   ```
   https://<YOUR_URL>.studio.region.sagemaker.aws/jupyter/default/proxy/6006/
   ```

1. Navigate to the URL to examine your results. 

# Use Amazon Q Developer with Amazon SageMaker Studio Classic
<a name="sm-q"></a>

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

Amazon SageMaker Studio Classic is an integrated machine learning environment where you can build, train, deploy, and analyze your models all in the same application. You can generate code recommendations and suggest improvements related to code issues by using Amazon Q Developer with Amazon SageMaker AI.

Amazon Q Developer is a generative artificial intelligence (AI) powered conversational assistant that can help you understand, build, extend, and operate AWS applications. In the context of an integrated AWS coding environment, Amazon Q can generate code recommendations based on developers' code, as well as their comments in natural language. 

Amazon Q has the most support for Java, Python, JavaScript, TypeScript, C\$1, Go, PHP, Rust, Kotlin, and SQL, as well as the Infrastructure as Code (IaC) languages JSON (CloudFormation), YAML (CloudFormation), HCL (Terraform), and CDK (Typescript, Python). It also supports code generation for Ruby, C\$1\$1, C, Shell, and Scala. For examples of how Amazon Q integrates with Amazon SageMaker AI and displays code suggestions in the Amazon SageMaker Studio Classic IDE, see [Code Examples](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/inline-suggestions-code-examples.html) in the *Amazon Q Developer User Guide*.

For more information on using Amazon Q with Amazon SageMaker Studio Classic, see the [Amazon Q Developer User Guide](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/sagemaker-setup.html).

# Manage Your Amazon EFS Storage Volume in Amazon SageMaker Studio Classic
<a name="studio-tasks-manage-storage"></a>

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

The first time a user on your team onboards to Amazon SageMaker Studio Classic, Amazon SageMaker AI creates an Amazon Elastic File System (Amazon EFS) volume for the team. A home directory is created in the volume for each user who onboards to Studio Classic as part of your team. Notebook files and data files are stored in these directories. Users don't have access to other team member's home directories. Amazon SageMaker AI domain does not support mounting custom or additional Amazon EFS volumes.

**Important**  
Don't delete the Amazon EFS volume. If you delete it, the domain will no longer function and all of your users will lose their work.

**To find your Amazon EFS volume**

1. Open the [SageMaker AI console](https://console.aws.amazon.com/sagemaker/).

1. On the left navigation pane, choose **Admin configurations**.

1. Under **Admin configurations**, choose **domains**. 

1. From the **Domains** page, select the domain to find the ID for.

1. From the **Domain details** page, select the **Domain settings** tab.

1. Under **General settings**, find the **Domain ID**. The ID will be in the following format: `d-xxxxxxxxxxxx`.

1. Pass the `Domain ID`, as `DomainId`, to the [describe\$1domain](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/sagemaker.html#SageMaker.Client.describe_domain) method.

1. In the response from `describe_domain`, note the value for the `HomeEfsFileSystemId` key. This is the Amazon EFS file system ID.

1. Open the [Amazon EFS console](https://console.aws.amazon.com/efs#/file-systems/). Make sure the AWS Region is the same Region that's used by Studio Classic.

1. Under **File systems**, choose the file system ID from the previous step.

1. To verify that you've chosen the correct file system, select the **Tags** heading. The value corresponding to the `ManagedByAmazonSageMakerResource` key should match the `Studio Classic ID`.

For information on how to access the Amazon EFS volume, see [Using file systems in Amazon EFS](https://docs.aws.amazon.com/efs/latest/ug/using-fs.html).

To delete the Amazon EFS volume, see [Deleting an Amazon EFS file system](https://docs.aws.amazon.com/efs/latest/ug/delete-efs-fs.html).

# Provide Feedback on Amazon SageMaker Studio Classic
<a name="studio-tasks-provide-feedback"></a>

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

Amazon SageMaker AI takes your feedback seriously. We encourage you to provide feedback.

**To provide feedback**

1. At the right of SageMaker Studio Classic, find the **Feedback** icon (![\[Speech bubble icon representing messaging or communication functionality.\]](http://docs.aws.amazon.com/sagemaker/latest/dg/images/studio/icons/feedback.png)).

1. Choose a smiley emoji to let us know how satisfied you are with SageMaker Studio Classic and add any feedback you'd care to share with us.

1. Decide whether to share your identity with us, then choose **Submit**.

# Shut Down and Update Amazon SageMaker Studio Classic and Apps
<a name="studio-tasks-update"></a>

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

The following topics show how to shut down and update SageMaker Studio Classic and Studio Classic Apps.

Studio Classic provides a notification icon (![\[Red circle icon with white exclamation mark, indicating an alert or warning.\]](http://docs.aws.amazon.com/sagemaker/latest/dg/images/icons/Notification.png)) in the upper-right corner of the Studio Classic UI. This notification icon displays the number of unread notices. To read the notices, select the icon.

Studio Classic provides two types of notifications:
+ Upgrade – Displayed when Studio Classic or one of the Studio Classic apps have released a new version. To update Studio Classic, see [Shut Down and Update Amazon SageMaker Studio Classic](studio-tasks-update-studio.md). To update Studio Classic apps, see [Shut Down and Update Amazon SageMaker Studio Classic Apps](studio-tasks-update-apps.md).
+ Information – Displayed for new features and other information.

To reset the notification icon, you must select the link in each notice. Read notifications may still display in the icon. This does not indicate that updates are still needed after you have updated Studio Classic and Studio Classic Apps.

To learn how to update [Amazon SageMaker Data Wrangler](https://docs.aws.amazon.com/sagemaker/latest/dg/data-wrangler.html), see [Shut Down and Update Amazon SageMaker Studio Classic Apps](studio-tasks-update-apps.md).

To ensure that you have the most recent software updates, update Amazon SageMaker Studio Classic and your Studio Classic apps using the methods outlined in the following topics.

**Topics**
+ [Shut Down and Update Amazon SageMaker Studio Classic](studio-tasks-update-studio.md)
+ [Shut Down and Update Amazon SageMaker Studio Classic Apps](studio-tasks-update-apps.md)

# Shut Down and Update Amazon SageMaker Studio Classic
<a name="studio-tasks-update-studio"></a>

**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 AI resources](security_iam_id-based-policy-examples.md#grant-tagging-permissions).  
[AWS managed policies for Amazon SageMaker AI](security-iam-awsmanpol.md) that give permissions to create SageMaker resources already include permissions to add tags while creating those resources.

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

To update Amazon SageMaker Studio Classic to the latest release, you must shut down the JupyterServer app. You can shut down the JupyterServer app from the SageMaker AI console, from Amazon SageMaker Studio or from within Studio Classic. After the JupyterServer app is shut down, you must reopen Studio Classic through the SageMaker AI console or from Studio which creates a new version of the JupyterServer app. 

You cannot delete the JupyterServer application while the Studio Classic UI is still open in the browser. If you delete the JupyterServer application while the Studio Classic UI is still open in the browser, SageMaker AI automatically re-creates the JupyterServer application.

Any unsaved notebook information is lost in the process. The user data in the Amazon EFS volume isn't impacted.

Some of the services within Studio Classic, like Data Wrangler, run on their own app. To update these services you must delete the app for that service. To learn more, see [Shut Down and Update Amazon SageMaker Studio Classic Apps](studio-tasks-update-apps.md).

**Note**  
A JupyterServer app is associated with a single Studio Classic user. When you update the app for one user it doesn't affect other users.

The following page shows how to update the JupyterServer App from the SageMaker AI console, from Studio, or from inside Studio Classic.

## Shut down and update from the SageMaker AI console
<a name="studio-tasks-update-studio-console"></a>

1. Navigate to [https://console.aws.amazon.com/sagemaker/](https://console.aws.amazon.com/sagemaker/).

1. On the left navigation pane, choose **Admin configurations**.

1. Under **Admin configurations**, choose **domains**. 

1. Select the domain that includes the Studio Classic application that you want to update.

1. Under **User profiles**, select your user name.

1. Under **Apps**, in the row displaying **JupyterServer**, choose **Action**, then choose **Delete**.

1. Choose **Yes, delete app**.

1. Type **delete** in the confirmation box.

1. Choose **Delete**.

1. After the app has been deleted, launch a new Studio Classic app to get the latest version.

## Shut down and update from Studio
<a name="studio-tasks-update-studio-updated"></a>

1. Navigate to Studio following the steps in [Launch Amazon SageMaker Studio](studio-updated-launch.md).

1. From the Studio UI, find the applications pane on the left side.

1. From the applications pane, select **Studio Classic**.

1. From the Studio Classic landing page, select the Studio Classic instance to stop.

1. Choose **Stop**.

1. After the app has been stopped, select **Run** to use the latest version.

## Shut down and update from inside Studio Classic
<a name="studio-tasks-update-studio-classic"></a>

1. Launch Studio Classic.

1. On the top menu, choose **File** then **Shut Down**.

1. Choose one of the following options:
   + **Shutdown Server** – Shuts down the JupyterServer app. Terminal sessions, kernel sessions, SageMaker images, and instances aren't shut down. These resources continue to accrue charges.
   + **Shutdown All** – Shuts down all apps, terminal sessions, kernel sessions, SageMaker images, and instances. These resources no longer accrue charges.

1. Close the window.

1. After the app has been deleted, launch a new Studio Classic app to use the latest version.

# Shut Down and Update Amazon SageMaker Studio Classic Apps
<a name="studio-tasks-update-apps"></a>

**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 AI resources](security_iam_id-based-policy-examples.md#grant-tagging-permissions).  
[AWS managed policies for Amazon SageMaker AI](security-iam-awsmanpol.md) that give permissions to create SageMaker resources already include permissions to add tags while creating those resources.

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

To update an Amazon SageMaker Studio Classic app to the latest release, you must first shut down the corresponding KernelGateway app from the SageMaker AI console. After the KernelGateway app is shut down, you must reopen it through SageMaker Studio Classic by running a new kernel. The kernel automatically updates. Any unsaved notebook information is lost in the process. The user data in the Amazon EFS volume isn't impacted.

After an application has been shut down for 24 hours, SageMaker AI deletes all metadata for the application. To be considered an update and retain application metadata, applications must be restarted within 24 hours after the previous application has been shut down. After this time window, creation of an application is considered a new application rather than an update of the previous application.

**Note**  
A KernelGateway app is associated with a single Studio Classic user. When you update the app for one user it doesn't effect other users.

**To update the KernelGateway app**

1. Navigate to [https://console.aws.amazon.com/sagemaker/](https://console.aws.amazon.com/sagemaker/).

1. On the left navigation pane, choose **Admin configurations**.

1. Under **Admin configurations**, choose **domains**. 

1. Select the domain that includes the application that you want to update.

1. Under **User profiles**, select your user name.

1. Under **Apps**, in the row displaying the **App name**, choose **Action**, then choose **Delete** 

   To update Data Wrangler, delete the app that starts with **sagemaker-data-wrang**.

1. Choose **Yes, delete app**.

1. Type **delete** in the confirmation box.

1. Choose **Delete**.

1. After the app has been deleted, launch a new kernel from within Studio Classic to use the latest version.

# Amazon SageMaker Studio Classic Pricing
<a name="studio-pricing"></a>

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

When the first member of your team onboards to Amazon SageMaker Studio Classic, Amazon SageMaker AI creates an Amazon Elastic File System (Amazon EFS) volume for the team. When this member, or any member of the team, opens Studio Classic, a home directory is created in the volume for the member. A storage charge is incurred for this directory. Subsequently, additional storage charges are incurred for the notebooks and data files stored in the member's home directory. For pricing information on Amazon EFS, see [Amazon EFS Pricing](https://aws.amazon.com/efs/pricing/).

Additional costs are incurred when other operations are run inside Studio Classic, for example, running a notebook, running training jobs, and hosting a model.

For information on the costs associated with using Studio Classic notebooks, see [Usage Metering for Amazon SageMaker Studio Classic Notebooks](notebooks-usage-metering.md).

For information about billing along with pricing examples, see [Amazon SageMaker Pricing](https://aws.amazon.com/sagemaker/pricing/).

If Amazon SageMaker Studio is your default experience, see [Amazon SageMaker Studio pricing](studio-updated-cost.md) for more pricing information.

# Troubleshooting Amazon SageMaker Studio Classic
<a name="studio-troubleshooting"></a>

**Important**  
As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see [Amazon SageMaker Studio](studio-updated.md).  
Studio Classic is still maintained for existing workloads but is no longer available for onboarding. You can only stop or delete existing Studio Classic applications and cannot create new ones. We recommend that you [migrate your workload to the new Studio experience](studio-updated-migrate.md).

**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 AI resources](security_iam_id-based-policy-examples.md#grant-tagging-permissions).  
[AWS managed policies for Amazon SageMaker AI](security-iam-awsmanpol.md) that give permissions to create SageMaker resources already include permissions to add tags while creating those resources.

This topic describes how to troubleshoot common Amazon SageMaker Studio Classic issues during setup and use. The following are common errors that might occur while using Amazon SageMaker Studio Classic. Each error is followed by its solution.

## Studio Classic application issues
<a name="studio-troubleshooting-ui"></a>

 The following issues occur when launching and using the Studio Classic application.
+ **Screen not loading: Clearing workspace and waiting doesn't help**

  When launching the Studio Classic application, a pop-up displays the following message. No matter which option is selected, Studio Classic does not load. 

  ```
  Loading...
  The loading screen is taking a long time. Would you like to clear the workspace or keep waiting?
  ```

  The Studio Classic application can have a launch delay if multiple tabs are open in the Studio Classic workspace or several files are on Amazon EFS. This pop-up should disappear in a few seconds after the Studio Classic workspace is ready. 

  If you continue to see a loading screen with a spinner after selecting either of the options, there could be connectivity issues with the Amazon Virtual Private Cloud used by Studio Classic.  

  To resolve connectivity issues with the Amazon Virtual Private Cloud (Amazon VPC) used by Studio Classic, verify the following networking configurations:
  + If your domain is set up in `VpcOnly` mode: Verify that there is an Amazon VPC endpoint for AWS STS, or a NAT Gateway for outbound traffic, including traffic over the internet. To do this, follow the steps in [Connect Studio notebooks in a VPC to external resources](studio-notebooks-and-internet-access.md). 
  + If your Amazon VPC is set up with a custom DNS instead of the DNS provided by Amazon: Verify that the routes are configured using Dynamic Host Configuration Protocol (DHCP) for each Amazon VPC endpoint added to the Amazon VPC used by Studio Classic. For more information about setting default and custom DHCP option sets, see [DHCP option sets in Amazon VPC](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_DHCP_Options.html). 
+ ****Internal Failure** when launching Studio Classic**

  When launching Studio Classic, you are unable to view the Studio Classic UI. You also see an error similar to the following, with **Internal Failure** as the error detail. 

  ```
  Amazon SageMaker Studio
  The JupyterServer app default encountered a problem and was stopped.
  ```

  This error can be caused by multiple factors. If completion of these steps does not resolve your issue, create an issue with https://aws.amazon.com/premiumsupport/.  
  + **Missing Amazon EFS mount target**: Studio Classic uses Amazon EFS for storage. The Amazon EFS volume needs a mount target for each subnet that the Amazon SageMaker AI domain is created in. If this Amazon EFS mount target is deleted accidentally, the Studio Classic application cannot load because it cannot mount the user’s file directory. To resolve this issue, complete the following steps. 

**To verify or create mount targets.**

    1. Find the Amazon EFS volume that is associated with the domain by using the [DescribeDomain](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeDomain.html) API call.  

    1. Sign in to the AWS Management Console and open the Amazon EFS console at [ https://console.aws.amazon.com/efs/](https://console.aws.amazon.com/efs/).

    1. From the list of Amazon EFS volumes, select the Amazon EFS volume that is associated with the domain. 

    1. On the Amazon EFS details page, select the **Network** tab. Verify that there are mount targets for all of the subnets that the domain is set up in. 

    1. If mount targets are missing, add the missing Amazon EFS mount targets. For instructions, see [Creating and managing mount targets and security groups](https://docs.aws.amazon.com/efs/latest/ug/accessing-fs.html). 

    1. After the missing mount targets are created, launch the Studio Classic application. 
  + **Conflicting files in the user’s `.local` folder**: If you're using JupyterLab version 1 on Studio Classic, conflicting libraries in your `.local` folder can cause issues when launching the Studio Classic application. To resolve this, update your user profile's default JupyterLab version to JupyterLab 3.0. For more information about viewing and updating the JupyterLab version, see [JupyterLab Versioning in Amazon SageMaker Studio Classic](studio-jl.md). 
+ ****ConfigurationError: LifecycleConfig** when launching Studio Classic**

  You can't view the Studio Classic UI when launching Studio Classic. This is caused by issues with the default lifecycle configuration script attached to the domain.

**To resolve lifecycle configuration issues**

  1. View the Amazon CloudWatch Logs for the lifecycle configuration to trace the command that caused the failure. To view the log, follow the steps in [Verify lifecycle configuration process from CloudWatch Logs](studio-lcc-debug.md#studio-lcc-debug-logs). 

  1. Detach the default script from the user profile or domain. For more information, see [Update and Detach Lifecycle Configurations in Amazon SageMaker Studio Classic](studio-lcc-delete.md). 

  1. Launch the Studio Classic application. 

  1. Debug your lifecycle configuration script. You can run the lifecycle configuration script from the system terminal to troubleshoot. When the script runs successfully from the terminal, you can attach the script to the user profile or the domain. 
+ **SageMaker Studio Classic core functionalities are not available.**

  If you get this error message when opening Studio Classic, it may be due to Python package version conflicts. This occurs if you used the following commands in a notebook or terminal to install Python packages that have version conflicts with SageMaker AI package dependencies.

  ```
  !pip install
  ```

  ```
  pip install --user
  ```

  To resolve this issue, complete the following steps:

  1. Uninstall recently installed Python packages. If you’re not sure which package to uninstall, create an issue with https://aws.amazon.com/premiumsupport/. 

  1. Restart Studio Classic:

     1. Shut down Studio Classic from the **File** menu.

     1. Wait for one minute.

     1. Reopen Studio Classic by refreshing the page or opening it from the AWS Management Console.

  The problem should be resolved if you have uninstalled the package which caused the conflict. To install packages without causing this issue again, use `%pip install` without the `--user` flag.

  If the issue persists, create a new user profile and set up your environment with that user profile.

  If these solutions don't fix the issue, create an issue with https://aws.amazon.com/premiumsupport/. 
+ **Unable to open Studio Classic from the AWS Management Console.**

  If you are unable to open Studio Classic and cannot make a new running instance with all default settings, create an issue with https://aws.amazon.com/premiumsupport/. 

## KernelGateway application issues
<a name="studio-troubleshooting-kg"></a>

 The following issues are specific to KernelGateway applications that are launched in Studio Classic. 
+ **Cannot access the Kernel session**

  When the user launches a new notebook, they are unable to connect to the notebook session. If the KernelGateway application's status is `In Service`, you can verify the following to resolve the issue. 
  + **Check Security Group configurations**

    If the domain is set up in `VPCOnly` mode, the security group associated with the domain must allow traffic between the ports in the range `8192-65535` for connectivity between the JupyterServer and KernelGateway apps.

**To verify the security group rules**

    1. Get the security groups associated with the domain using the [DescribeDomain](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeDomain.html) API call.

    1. Sign in to the AWS Management Console and open the Amazon VPC console at [https://console.aws.amazon.com/vpc/](https://console.aws.amazon.com/vpc/).

    1. From the left navigation, under **Security**, choose **Security Groups**.

    1. Filter by the IDs of the security groups that are associated with the domain.

    1. For each security group: 

       1. Select the security group. 

       1. From the security group details page, view the **Inbound rules**. Verify that traffic is allowed between ports in the range `8192-65535`. 

    For more information about security group rules, see [Control traffic to resources using security groups](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html#working-with-security-group-rules). For more information about requirements to use Studio Classic in `VPCOnly` mode, see [Connect Studio notebooks in a VPC to external resources](studio-notebooks-and-internet-access.md).
  + **Verify firewall and WebSocket connections**

    If the KernelGateway apps have an `InService` status and the user is unable to connect to the Studio Classic notebook session, verify the firewall and WebSocket settings. 

    1. Launch the Studio Classic application. For more information, see [Launch Amazon SageMaker Studio Classic](studio-launch.md). 

    1. Open your web browser’s developer tools. 

    1. Choose the **Network** tab. 

    1. Search for an entry that matches the following format.

       ```
       wss://<domain-id>.studio.<region>.sagemaker.aws/jupyter/default/api/kernels/<unique-code>/channels?session_id=<unique-code>
       ```

       If the status or response code for the entry is anything other than `101`, then your network settings are preventing the connection between the Studio Classic application and the KernelGateway apps.

       To resolve this issue, contact the team that manages your networking settings to allow list the Studio Classic URL and enable WebSocket connections.  
+ **Unable to launch an app caused by exceeded resource quotas**

  When a user tries to launch a new notebook, the notebook creation fails with either of the following errors. This is caused by exceeding resource quotas. 
  + 

    ```
    Unable to start more Apps of AppType [KernelGateway] and ResourceSpec(instanceType=[]) for UserProfile []. Please delete an App with a matching AppType and ResourceSpec, then try again
    ```

    Studio Classic supports up to four running KernelGateway apps on the same instance. To resolve this issue, you can do either of the following:
    + Delete an existing KernelGateway application running on the instance, then restart the new notebook.
    + Start the new notebook on a different instance type

     For more information, see [Change the Instance Type for an Amazon SageMaker Studio Classic Notebook](notebooks-run-and-manage-switch-instance-type.md).
  + 

    ```
    An error occurred (ResourceLimitExceeded) when calling the CreateApp operation
    ```

    In this case, the account does not have sufficient limits to create a Studio Classic application on the specified instance type. To resolve this, navigate to the Service Quotas console at [https://console.aws.amazon.com/servicequotas/](https://console.aws.amazon.com/servicequotas/). In that console, request to increase the `Studio KernelGateway Apps running on instance-type instance` limit. For more information, see [AWS service quotas](https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html). 