Repolode
aws

aws/amazon-sagemaker-examples

A collection of example Jupyter notebooks showing how to build, train, and deploy machine learning models on Amazon SageMaker.

Stars
10,994
Forks
6,951
Open issues
855
Last commit
10 days ago

What is it?

This repository is a library of Jupyter notebooks that walk through the Amazon SageMaker workflow from start to finish. The notebooks are grouped by lifecycle stage: training, model customization, evaluation, inference, and MLOps. Each notebook is self-contained and includes its own scripts, data, and images.

The training examples use the ModelTrainer class from SageMaker Python SDK v3 and cover distributed training, managed spot training with checkpointing, bring-your-own-container, and running local code as a training job. Model customization examples cover fine-tuning methods such as supervised fine-tuning, DPO, RLVR, and continued pre-training. Inference examples use ModelBuilder and cover real-time, serverless, and asynchronous endpoints, A/B testing, autoscaling, and deployment to Amazon Bedrock.

The notebooks are designed to run inside SageMaker Notebook Instances, where they are preloaded, and can also run elsewhere after updating the IAM role and installing dependencies. The official repository is maintained by the SageMaker team, and a separate community repository accepts additional examples.

Key features

  • 01Notebooks organized by lifecycle stage: training, model customization, evaluation, inference, and MLOps
  • 02Examples built on ModelTrainer and ModelBuilder from SageMaker Python SDK v3
  • 03Coverage of distributed training, managed spot training, and bring-your-own-container
  • 04Inference examples for real-time, serverless, and asynchronous endpoints
  • 05MLOps examples with SageMaker Pipelines, Model Registry, Feature Store, and MLflow

Use cases

  • Learning how to train and deploy a model on SageMaker with a working example
  • Fine-tuning a foundation model with SFT, DPO, or reinforcement learning on SageMaker
  • Setting up an MLOps pipeline with model registry and lineage tracking
  • Comparing deployment options such as real-time, serverless, and batch inference

Quick start

  1. 1

    Create an AWS account

  2. 2

    Set up IAM user and role permissions

  3. 3

    Create an Amazon SageMaker Notebook Instance and an S3 bucket

  4. 4

    Open the SageMaker Examples tab in Jupyter or JupyterLab and run a notebook

Things to know

  • Requires an AWS account, and running the examples incurs AWS charges.
  • Most examples depend on SageMaker-managed resources, so running them elsewhere needs modification such as updating the IAM role and installing libraries.

In collections

Topics

FAQ

What is amazon-sagemaker-examples?
A collection of example Jupyter notebooks showing how to build, train, and deploy machine learning models on Amazon SageMaker. This repository is a library of Jupyter notebooks that walk through the Amazon SageMaker workflow from start to finish. The notebooks are grouped by lifecycle stage: training, model customization, evaluation, inference, and MLOps. Each notebook is self-contained and includes its own scripts, data, and images.
Is amazon-sagemaker-examples free to use? What license does it have?
amazon-sagemaker-examples is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is amazon-sagemaker-examples still maintained?
Actively maintained. The last commit to amazon-sagemaker-examples was on Oct 14, 2026.
What can I use amazon-sagemaker-examples for?
Learning how to train and deploy a model on SageMaker with a working example Fine-tuning a foundation model with SFT, DPO, or reinforcement learning on SageMaker Setting up an MLOps pipeline with model registry and lineage tracking Comparing deployment options such as real-time, serverless, and batch inference
How do I install amazon-sagemaker-examples?
Create an AWS account Set up IAM user and role permissions Create an Amazon SageMaker Notebook Instance and an S3 bucket Open the SageMaker Examples tab in Jupyter or JupyterLab and run a notebook
Where can I get amazon-sagemaker-examples?
The source code and installation instructions are on GitHub: https://github.com/aws/amazon-sagemaker-examples

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects