Delete or stop your Studio running instances, applications, and spaces
To avoid additional charges from unused Studio running instances, applications, or spaces, you can stop or delete them. This page will provide some information about the differences between stopping or deleting your Studio running instances, applications, or spaces, followed by instructions.
We briefly give an overview of the differences between a space, application, and instance in the following bullet points:
-
When you create a space, you are creating the necessary resources to run an application. This includes an Amazon Elastic Block Store (Amazon EBS) volume where your data is stored. When you delete a space, you are also deleting your data stored in the space.
-
When you open an application, you will need to start an instance for the application to run on.
When you close an application, you will not automatically stop and delete the instance. You can reopen the application while the instance is running.
When you use the
DeleteApp
API you also stop and delete the instance. You can restart the instance and application after using this API. -
For the instructions on this page, the action to stop an instance or delete an instance has the same effect. When you stop or delete an instance, you also stop the application.
Similarly, to stop an instance is the same as to stop or delete an application.
Note
If the service detects that an application is unhealthy, it assumes the
AmazonSageMakerNotebooksServiceRolePolicy
service linked role and deletes the application using the
DeleteApp
API.
For more information about the differences between Studio spaces, application, and instances, see View your Studio running instances, applications, and spaces.
Delete or stop your Amazon SageMaker Studio application or running instance
To avoid additional charges from unused running applications, you can stop and delete those applications and running instances. The following provides some information on stopping or deleting an application or instance:
-
In the following instructions, to delete an application (uses the
DeleteApp
API) has the same effect as to stop the instance for the application. Following the instructions to delete an application or stop an instance, both stops and deletes the application and the instance for the application. -
After you delete an application or stop an instance, you can start up the instance and application again later.
-
When you delete an application or stop an instance, the files in the space will persist. You can run the application again and expect to have access to the same files that are stored in the space, as you did before deleting the application.
-
When you delete an application or stop an instance, the metadata for the application will be deleted within 24 hours. For more information, see the note in the
CreationTime
response element for the DescribeApp API.
-
The following tabs provide instructions to stop and delete an application from your domain using the Studio UI, the SageMaker console, or the AWS CLI.
Note
To view and stop all of your Studio running instances in one location, we recommend the Use the Studio UI to delete your domain applications workflow from the following options.
To delete your Studio applications using the Studio UI, use the following instructions.
To delete your domain applications (Studio UI)
-
Launch Studio. This process may differ depending on your setup. For information about launching Studio, see Launch Amazon SageMaker Studio.
-
From the left navigation pane, choose Running instances.
If the table on the page is empty, you don't have any running instances or applications in your spaces.
-
In the table under the Name and Application columns, find the space name and the application that you want to stop and delete.
-
Choose the corresponding Stop button to stop and delete the application.
To view or stop Studio running instances from a centralized location, see Use the Studio UI to delete your domain applications. Otherwise, use the following instructions.
In the SageMaker console, you can only stop the running Studio applications for the spaces that you are able to view in the Spaces section of the console. For a list of the viewable spaces, see View your Studio spaces.
These steps show how to delete your Studio applications by using the SageMaker console.
To delete applications instructions (console)
-
Open the Amazon SageMaker console at https://console.aws.amazon.com/sagemaker/
. -
From the left navigation pane, expand Admin configurations and choose Domains.
-
Choose the domain that you want to revert.
-
On the Domain details page, choose the Space management tab.
-
Important
In the Space management tab, you have the option to delete the space. There is a difference between deleting the space and deleting an application. If you delete the space, you will lose access to the data within that space. Do not delete the space unless you're sure that you want to.
To stop and delete the application, in the Space management tab and under the Name column, choose the space for the application.
-
In the Apps section and under the App type column, search for the app to stop and delete.
-
Under the Action column, choose the corresponding Delete app button.
-
In the pop-up box, choose Yes, delete app. After you do so the delete input field becomes available.
-
Enter
delete
in the delete input field to confirm deletion. -
Choose Delete.
To view or stop any of your Studio running instances from a centralized location, see Use the Studio UI to delete your domain applications. Otherwise, use the following instructions.
The following code examples use the DeleteApp
API to delete an application in an
example domain.
To stop your running JupyterLab or Code Editor instances, use the following code example:
aws sagemaker delete-app \ --domain-id
example-domain-id
\ --regionAWS Region
\ --app-name default \ --app-typeexample-app-type
\ --space-nameexample-space-name
-
To obtain your
, use the following instructions:example-domain-id
To get
example-domain-id
-
Open the Amazon SageMaker console at https://console.aws.amazon.com/sagemaker/
. -
From the left navigation pane, expand Admin configurations and choose Domains.
-
Choose the relevant domain.
-
On the Domain details page, choose the Domain settings tab.
-
Copy the Domain ID.
-
-
To obtain your
, use the following instructions to ensure you are using the correct AWS Region for your domain:AWS Region
To get
AWS Region
-
Open the Amazon SageMaker console at https://console.aws.amazon.com/sagemaker/
. -
From the left navigation pane, expand Admin configurations and choose Domains.
-
Choose the relevant domain.
-
On the Domain details page, verify that this is the relevant domain.
-
Expand the region dropdown list from the top right of the SageMaker console, and use the corresponding AWS Region ID to the right of your AWS Region name. For example,
us-west-1
.
-
-
For
, use the application type that's relevant to the application that you want to stop. For example, replaceexample-app-type
with one of the following application types:example-app-type
-
JupyterLab application type:
JupyterLab
. For information about JupyterLab, see SageMaker JupyterLab. -
Code Editor application type:
CodeEditor
. For information about Code Editor, based on Code-OSS, Visual Studio Code - Open Source, see Code Editor in Amazon SageMaker Studio.
-
-
To obtain your
, use the following steps:example-space-name
To get
example-space-name
-
Open the Amazon SageMaker console at https://console.aws.amazon.com/sagemaker/
. -
From the left navigation pane, expand Admin configurations and choose Domains.
-
Choose the relevant domain.
-
On the Domain details page, choose the Space management tab.
-
Copy the relevant space name.
-
To stop running instances for SageMaker Canvas, Studio Classic, or RStudio, use the following code example:
aws sagemaker delete-app \ --domain-id
example-domain-id
\ --regionAWS Region
\ --app-name default \ --app-typeexample-app-type
\ --user-profileexample-user-name
-
For
, use the application type relevant to the application that you want to stop. For example, replaceexample-app-type
with one of the following application types:example-app-type
-
SageMaker Canvas application type:
Canvas
. For information about SageMaker Canvas, see Amazon SageMaker Canvas. -
Studio Classic application type:
JupyterServer
. For information about Studio Classic, see Amazon SageMaker Studio Classic. -
RStudio application type:
RStudioServerPro
. For information about RStudio, see RStudio on Amazon SageMaker.
-
-
To obtain your
, navigate to the Domain details page.example-user-name
-
Next, choose the User profiles tab, and copy the relevant space name.
-
For alternative instructions to delete your running Studio applications, see:
-
JupyterLab: Delete unused resources.
-
Code Editor: Shut down Code Editor resources.
-
SageMaker Canvas: Logging out of Amazon SageMaker Canvas.
-
Studio Classic: Shut Down and Update SageMaker Studio Classic and Studio Classic Apps.
-
RStudio: Shut down RStudio.
Delete a Studio space
Important
After you delete your space, you will lose all of the data stored in the space. We recommend that you back up your data before deleting your space.
To delete a Studio space, you will need to have administrator permissions or at least have permissions to update domain, IAM and Amazon S3.
-
Spaces are used to manage the storage and resource needs of the relevant application. When you delete a space, the storage volume also deletes. Therefore, you lose access to the files stored on that space. For more information about Studio spaces, see Amazon SageMaker Studio spaces.
We recommend that you back up your data if you choose to delete a space.
-
After you delete a space, you can't access that space again.
You can delete the Studio spaces that are viewable in the Spaces section of the console. For a list of the viewable spaces, see View your Studio spaces.
There are no spaces for SageMaker Canvas, Studio Classic (private), and RStudio. To stop and delete your SageMaker Canvas, Studio Classic (private), or RStudio applications, see Delete or stop your Amazon SageMaker Studio application or running instance.
The Spaces section within your Domain details page gives information about Studio spaces within you domain. You can view, create, and delete spaces on this page.
To view Studio spaces in a domain
-
Open the Amazon SageMaker console at https://console.aws.amazon.com/sagemaker/
. -
From the left navigation pane, expand Admin configurations and choose Domains.
-
Choose the domain where you want to view the spaces.
-
On the Domain details, choose Space management to open the Spaces section.
-
Select the space to delete.
-
Choose Delete.
-
In the pop-up box titled Delete space, you have two options:
-
If you already shut down all applications in the space, choose Yes, delete space.
-
If you still have applications running in the space, choose Yes, shut down all apps and delete space.
-
-
Enter
delete
in the delete input field to confirm deletion. -
To delete the space, you have two options:
-
If you already shut down all applications in the space, choose Delete space.
-
If you still have applications running in the space, choose Shut down all apps and delete space.
-
Before you can delete a space using the AWS CLI, you must delete the application associated with it. For information about stopping your Studio applications, see Delete or stop your Amazon SageMaker Studio application or running instance.
Use the following AWS CLI command to delete a space within a domain:
aws sagemaker delete-space \ --domain-id
example-domain-id
\ --regionAWS Region
\ --space-nameexample-space-name
-
To obtain your
, use the following instructions:example-domain-id
To get
example-domain-id
-
Open the Amazon SageMaker console at https://console.aws.amazon.com/sagemaker/
. -
From the left navigation pane, expand Admin configurations and choose Domains.
-
Choose the relevant domain.
-
On the Domain details page, choose the Domain settings tab.
-
Copy the Domain ID.
-
-
To obtain your
, use the following instructions to ensure you are using the correct AWS Region for your domain:AWS Region
To get
AWS Region
-
Open the Amazon SageMaker console at https://console.aws.amazon.com/sagemaker/
. -
From the left navigation pane, expand Admin configurations and choose Domains.
-
Choose the relevant domain.
-
On the Domain details page, verify that this is the relevant domain.
-
Expand the region dropdown list from the top right of the SageMaker console, and use the corresponding AWS Region ID to the right of your AWS Region name. For example,
us-west-1
.
-
-
To obtain your
, use the following steps:example-space-name
To get
example-space-name
-
Open the Amazon SageMaker console at https://console.aws.amazon.com/sagemaker/
. -
From the left navigation pane, expand Admin configurations and choose Domains.
-
Choose the relevant domain.
-
On the Domain details page, choose the Space management tab.
-
Copy the relevant space name.
-