> ## Documentation Index
> Fetch the complete documentation index at: https://help.nops.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Enable Idle Shutdown for SageMaker Studio Apps

> Turn on idle shutdown for SageMaker Studio apps that run around the clock.

SageMaker Studio apps (JupyterLab, Code Editor, KernelGateway, RStudio sessions) and Canvas sessions are billed for every hour they run, including hours nobody uses them. nOps finds Studio apps that have run almost every hour for the last 30 days and estimates the saving from shutting them down outside a 60-hour working week (12 hours on each weekday).

| | |
| - | - |
| **Cloud** | AWS |
| **Category** | AI |
| **Service** | Amazon SageMaker |
| **Action** | Modify |
| **Effort** | Low |
| **Restart needed** | Yes |
| **Can be rolled back** | Yes |
| **Analysis window** | Last 30 days |
| **Source** | nOps |

## Why it matters

Studio apps keep running after a browser tab is closed. Without idle shutdown, an app on a large or GPU instance can cost as much overnight and at weekends as during the working day.

## How nOps finds it

nOps reads the last 30 complete days of SageMaker Studio and Canvas billing per app. An app is flagged when it was billed on average at least 20 hours a day, with at least 24 days of 20 or more hours, it has been billed since the start of the window and is still running. Apps mostly covered by Savings Plans are left out. The saving is the last 7 days of on-demand cost scaled to a month, times the share of the week outside 60 working hours (about 64%). Savings under \$5 a month are not shown.

## Before you start

Permission to update the Studio domain or space settings (`sagemaker:UpdateDomain`, `sagemaker:UpdateSpace`).

## How to implement

1. Check with the app's owner that no long-running kernel work needs it to stay up overnight.
2. In the SageMaker console, open the Studio domain, go to **App Configurations**, and turn on **Idle shutdown** for JupyterLab and Code Editor with a timeout (for example 60 minutes). This sets the domain's `IdleSettings`.
3. For Canvas, set an automatic logout time in the domain's Canvas settings.
4. For older KernelGateway or RSession apps, use a lifecycle configuration that shuts idle apps down.
5. Keep the setting in your Terraform or CloudFormation definition of the domain.

## Risks and considerations

* Unsaved kernel state is lost when the app shuts down. Files in the space's storage volume are kept.
* The estimate assumes a 60-hour working week, so the saving is lower if the team works longer hours.
* To roll back, turn idle shutdown off again.

## FAQs

> [accordion] Will users lose their files?
>
> No. The space's storage volume is kept when the app shuts down. Only unsaved work in memory is lost.

## Related

* [Enable Auto-Stop for Idle SageMaker Notebook Instances](https://help.nops.io/inform/supported-recommendations/enable-auto-stop-for-idle-sagemaker-notebook-instances)
* [Enable Idle Shutdown on Always-On Vertex AI Workbench Instances](https://help.nops.io/inform/supported-recommendations/enable-idle-shutdown-on-always-on-vertex-ai-workbench-instances)
* [Stop Idle AppStream Image Builders](https://help.nops.io/inform/supported-recommendations/stop-idle-appstream-image-builders)
* [Supported recommendations](https://help.nops.io/inform/supported-recommendations.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.