Submit feedback on
Idle SageMaker Notebook Instances Left Running Continuously
We've received your feedback.
Thanks for reaching out!
Oops! Something went wrong while submitting the form.
Close
Idle SageMaker Notebook Instances Left Running Continuously
Taylor Houck
CER:

CER-0333

Service Category
AI
Cloud Provider
AWS
Service Name
AWS SageMaker
Inefficiency Type
Unused Resource
Explanation

SageMaker notebook instances are billed continuously while in an active state — and critically, they do not automatically shut down when idle. Closing a browser tab, shutting down a Jupyter kernel, or simply walking away does not stop the underlying compute instance. This creates a pervasive waste pattern in ML and data science teams: a developer spins up a powerful GPU instance for experimentation, finishes their work, closes the browser, and assumes the resource is no longer running. In reality, the instance continues accruing per-second charges around the clock until it is explicitly stopped.

This is particularly costly because ML workloads often require high-performance instance types with GPUs. A single forgotten GPU notebook instance can generate thousands of dollars in monthly charges with zero productive use. The problem is compounded in team environments where multiple data scientists each maintain their own notebook instances, and there is no organizational process for reviewing or reclaiming idle resources. The classic scenario — an instance left running over a weekend or holiday — is one of the most common and avoidable sources of ML infrastructure waste.

Unlike SageMaker Studio, which offers native automatic shutdown of idle applications, traditional notebook instances have no built-in idle detection or auto-stop capability. Without explicit lifecycle configuration scripts or external automation, these instances will run indefinitely. The user experience itself is deceptive: the act of closing a notebook feels like shutting down, but the billable compute continues silently in the background.

Relevant Billing Model

SageMaker notebook instances are billed based on:

  • Per-second compute charges (with a one-minute minimum) — incurred continuously while the instance is in an active state, regardless of whether any notebooks are open or any computation is occurring
  • Instance type pricing — costs vary dramatically by instance type, from modest rates for small CPU instances to substantial hourly rates for GPU-accelerated instances.
  • Attached EBS storage — billed per GB-month for the persistent storage volume, which continues to accrue charges even when the instance is stopped.

Billing starts when the instance enters an active state and continues until the instance is explicitly stopped through the console or API. Stopping an instance halts compute charges, but storage charges for the attached EBS volume persist. The primary cost driver for idle instances is the compute charge, which runs uninterrupted 24/7 if the instance is never stopped.

Detection
  • Identify notebook instances that have been in an active state for an extended period without corresponding training jobs, endpoint deployments, or other productive ML workloads
  • Review compute utilization patterns for notebook instances over a representative period to find those with consistently negligible activity
  • Assess whether notebook instances with no recent network activity or kernel sessions are still needed for active development work
  • Evaluate the duration of continuous uptime for each notebook instance — instances running uninterrupted for days or weeks without active use are strong candidates for waste
  • Confirm with data science and ML teams whether long-running notebook instances are actively being used or have been forgotten after experimentation concluded
  • Examine billing records for sustained notebook instance charges that are disproportionate to the volume of ML experimentation or training activity in the account
Remediation
  • Stop all notebook instances that are confirmed to be idle or no longer needed for active development — stopping halts compute billing immediately while preserving data on the attached storage volume
  • Attach lifecycle configuration scripts to notebook instances that implement automatic idle detection and shutdown after a defined period of inactivity, preventing instances from running uninterrupted when not in use
  • Implement scheduled automation to stop notebook instances outside of business hours (evenings, weekends, holidays), requiring users to explicitly restart them when needed
  • Evaluate migrating workloads from traditional notebook instances to SageMaker Studio, which offers native automatic shutdown of idle applications and more granular resource management
  • Establish organizational policies requiring data science teams to use appropriately sized instance types for their workloads — reserving expensive GPU instances for tasks that genuinely require them rather than general exploration
  • Set up regular audits of running notebook instances across all accounts and regions, with automated alerts when instances exceed a defined continuous runtime threshold without productive activity
Submit Feedback