NovuSpark
All articles

October 17, 2025 · NovuSpark Team

Amazon SageMaker 101: Notebooks, Training Jobs, and Endpoints

This is the first post in our Amazon SageMaker series. Later posts cover training with built-in algorithms, deployment endpoints, Pipelines, and cost optimization.

Amazon Bedrock, covered in our previous series, solves the problem of calling an existing, pre-trained foundation model. SageMaker solves a genuinely different problem: training your own model — on your own data, for a task a general-purpose foundation model may not directly address at all — and deploying it, without personally provisioning and managing the underlying training and serving infrastructure by hand.

Notebooks: where exploration actually happens

import sagemaker
from sagemaker import get_execution_role
 
session = sagemaker.Session()
role = get_execution_role()
bucket = session.default_bucket()
 
print(f"Using bucket: {bucket}")
print(f"Execution role: {role}")

A SageMaker Notebook Instance is a managed Jupyter environment, pre-configured with the SageMaker SDK and appropriate IAM permissions already wired in through get_execution_role() — the same IAM-first design principle covered throughout this blog for GitHub Actions and Bedrock, applied here to a notebook's own access to S3, training infrastructure, and model artifacts. This is genuinely where data exploration, feature engineering, and initial model experimentation happen — not where production training or serving actually runs at real scale.

Training jobs: provisioned infrastructure, used, then released

from sagemaker.estimator import Estimator
 
estimator = Estimator(
    image_uri="683313688378.dkr.ecr.eu-west-2.amazonaws.com/sagemaker-xgboost:1.7-1",
    role=role,
    instance_count=1,
    instance_type="ml.m5.xlarge",
    output_path=f"s3://{bucket}/model-output",
)
 
estimator.set_hyperparameters(
    objective="binary:logistic",
    num_round=100,
    max_depth=5,
)
 
estimator.fit({"train": f"s3://{bucket}/training-data/train.csv"})

estimator.fit() is where the actual infrastructure provisioning happens — SageMaker spins up the requested instance(s), runs the training container against the specified S3 data, writes the resulting model artifact back to S3, and tears the training instance down automatically once the job completes. This is directly analogous to the disposable, ephemeral compute model covered for Docker containers and GitHub Actions runners earlier in this blog: you're billed only for the actual training duration, not for infrastructure sitting idle before or after — no persistent training server to separately provision, monitor, or remember to shut down.

Endpoints: deploying a trained model for real-time inference

predictor = estimator.deploy(
    initial_instance_count=1,
    instance_type="ml.m5.large",
)
 
result = predictor.predict([[5.1, 3.5, 1.4, 0.2]])
print(result)

Unlike a training job, deploy() provisions infrastructure that stays running — a real-time endpoint, ready to serve prediction requests continuously, billed for as long as it's up, not just for the duration of a single request. This is a meaningfully different cost and operational model than training: a training job's cost is bounded and predictable (a fixed job duration); an endpoint's cost accrues continuously until you explicitly tear it down.

Cleaning up: the step it's genuinely easy to forget

predictor.delete_endpoint()

An idle SageMaker endpoint left running after an experiment is finished accrues real, ongoing cost — the exact same "forgotten instance quietly costing money for months" risk flagged for a stray Terraform-provisioned resource earlier in this blog, applied here to inference endpoints specifically, which are especially easy to spin up during experimentation and then simply forget about once attention moves elsewhere.

The three core concepts, and how they relate

  • Notebooks are for exploration and experimentation — not where production training or serving happens.
  • Training jobs provision infrastructure for a bounded duration, then release it automatically — the disposable-compute model applied to model training specifically.
  • Endpoints provision infrastructure that stays running continuously, for real-time inference — a genuinely different cost and operational profile than a training job, and something that needs to be deliberately torn down when no longer needed.

What to actually remember from this post

  • SageMaker trains and deploys your own model; Bedrock calls an existing foundation model — genuinely different problems, not competing solutions to the same one.
  • Notebooks are for exploration; real training and serving run on separately-provisioned, purpose-specific infrastructure.
  • A training job's infrastructure is automatically released when the job completes — bounded, predictable cost, the same disposable-compute principle as a CI runner or a Docker container.
  • An endpoint stays running until explicitly deleted — a continuously-accruing cost that's genuinely easy to forget about after an experiment ends.

Next in the series: Training Your First Model with SageMaker Built-in Algorithms, where we go deeper on the training step introduced here.

Ready when you are

Want training built around your team's real work?

Tell us about your team and what you're trying to solve — we'll recommend a program that fits.