Skip to main contentSkip to user menuSkip to navigation

Amazon SageMaker

Master Amazon SageMaker: end-to-end ML platform, model training, deployment, and MLOps workflows.

50 min readAdvanced
Not Started
Loading...

What is Amazon SageMaker AI?

Amazon SageMaker AI is a managed AWS platform for running ML preparation, training, evaluation, registry, workflow, and inference workloads. It supplies managed job and endpoint control planes, integrations with S3, IAM, networking, monitoring, and several specialized ML capabilities.

SageMaker reduces infrastructure work; it does not own model correctness. The core invariant is: every training artifact and deployed model must remain tied to versioned data, code, configuration, evaluation evidence, approval, and a recoverable serving contract. A successful managed job is not automatically a releasable model.

Build the lifecycle from owned boundaries

  1. 1

    Data

    Version the input contract

    Freeze training and evaluation datasets, schemas, feature definitions, access policy, and lineage.

  2. 2

    Train

    Run an isolated job

    Pin container, code, dependencies, instance shape, seeds, hyperparameters, and checkpoint location.

  3. 3

    Evaluate

    Gate a model package

    Compare product and safety metrics on locked slices, attach evidence, and require explicit approval.

  4. 4

    Serve

    Deploy a measured contract

    Choose an inference mode from payload, deadline, arrival, and idle behavior; canary and observe it.

Inference mode lab

Match the request contract to the serving path

Loading inference constraints.

Loading modes

Choose inference mode from the request shape

The documented modes solve different problems:

  • Real-time inference provides a persistent managed endpoint for sustained online requests with low-latency or high-throughput requirements.
  • Serverless inference targets intermittent synchronous traffic that fits its payload, duration, memory, concurrency, and feature limits and can tolerate cold starts.
  • Asynchronous inference queues requests, accepts S3 payload references, and writes results to S3 for large or long-running near-real-time work.
  • Batch Transform processes finite offline datasets without a persistent endpoint.
Reject inference modes that violate hard request constraints

After eligibility, benchmark the real model and target region. Record cold and warm latency, tail latency, throughput, queue delay, model load, host and accelerator memory, failure behavior, autoscaling lag, and the current AWS prices you actually pay. Do not infer requests per second from an instance family name.

Make training reproducible and interruptible

A training job should consume immutable inputs and produce a content-addressed model artifact plus metrics, logs, environment metadata, and checkpoints. For distributed training, coordinate checkpoint file names and ensure the model, optimizer, scheduler, random state, and current step are restored consistently.

Managed Spot Training can reduce billable compute for eligible workloads, but interruptions are part of the contract. AWS documentation requires checkpointing for resumption across Spot instance replacement. The training script controls checkpoint frequency for custom frameworks.

Write replaceable checkpoint files to SageMaker's checkpoint path
Training interruption lab

Bound replay work with explicit checkpoints

Move the interruption and checkpoint interval. The lab computes exact lost steps and minutes; it does not estimate Spot interruption frequency or discounts.

Last durable step

600

Lost work

50 steps

100 compute-minutes

Resume work

400 steps

Recovery source

Checkpoint

Durable: 600Interrupted: 650Goal: 1000

A replacement job can resume from step 600; replay is bounded to 50 steps in this scenario.

Gate the model package, not only the training metric

  • evaluate on a locked test set and decision-critical slices;
  • verify preprocessing parity between training and inference containers;
  • record model, data, code, image, dependency, and evaluation identities;
  • register only artifacts that pass explicit product, safety, latency, and resource gates;
  • require approval proportionate to model risk and preserve the evidence behind it;
  • canary a new model or endpoint configuration and keep a tested rollback target;
  • reconcile delayed labels and monitor product outcomes, not just input statistics.

SageMaker Pipelines can express a DAG of processing, training, evaluation, condition, registration, and deployment steps. Pipeline success proves that automation ran; the condition and approval evidence determine whether a model should advance.

Operate cost, security, and monitoring as separate controls

  • Use least-privilege IAM roles for jobs, pipelines, registries, and endpoint invocation.
  • Restrict network paths and encrypt data, artifacts, volumes, logs, and captured requests according to their classification.
  • Tag jobs and endpoints with owner, model package, environment, and cost center; remove idle endpoints and abandoned artifacts through governed lifecycle rules.
  • Separate compute utilization from model quality. A saturated endpoint may need capacity; a drifting product metric may need data or model intervention.
  • Test missing S3 access, image pull failure, out-of-memory, checkpoint corruption, endpoint scaling lag, malformed payloads, and rollback.

AWS documentation currently announces that new-customer access to SageMaker Model Monitor closes on 2026-07-30, while existing customers may continue. Verify current service availability and keep monitoring contracts portable through captured evidence, metrics, alerts, and custom analysis jobs.

No quiz questions available
Could not load questions file
Spotted an issue or have a better explanation? This page is open source.Edit on GitHub·Suggest an improvement