AIToday
Large Language ModelsOpen-Source AIAmazon AI BlogPublished: Aug 27, 2026, 04:00 JST2 min read

AWS SageMaker SDK v3 streamlines bring-your-own-model

AWS SageMaker SDK v3 streamlines bring-your-own-model

Key takeaway

  • AWS unveiled a redesigned SageMaker Python SDK v3. It simplifies bringing your own model by using a single ModelTrainer class.

  • You can now inject code into any container at runtime.

  • This removes the need to rebuild Docker images for each change.

3 Key Points

  1. What happened

    AWS announced a redesigned SageMaker Python SDK v3 that replaces framework-specific estimator classes with a single ModelTrainer for training and ModelBuilder for deployment. It introduces a SourceCode object that syncs your local code into a container at runtime, so you no longer need to build or maintain Docker images for each algorithm.

  2. Why it matters

    This cuts iteration time—you can change your training script and rerun without rebuilding a container. It also gives full control over the container environment, such as installing system packages or CUDA libraries, and offers one identical API across frameworks like scikit-learn, PyTorch, and even custom C++ inference binaries.

  3. What to watch

    The post includes two end-to-end examples: training a scikit-learn Random Forest on the diabetes dataset and deploying it with DJL Serving, and fine-tuning Stable Diffusion 3.5 with LoRA using Hugging Face Accelerate. You can use any container image from Amazon ECR, including your own, an AWS Deep Learning Container, or a third-party image.

Ask the AI about this article →

Context & Analysis

The SageMaker SDK v3 redesign marks a shift from the earlier v2 pattern, where each framework had its own estimator class and required managing container images. With the new ModelTrainer and ModelBuilder, the workflow is unified across frameworks, and code is synced at runtime via the SourceCode object. This simplifies the bring-your-own-model process, which was first introduced in 2021, by removing the need to build and maintain custom Docker images for each training run.

Practical implications include faster iteration—since code changes don't require container rebuilds—and greater flexibility in container choice, including custom images with system packages or CUDA libraries. The post also highlights the ability to use pre-built AWS Deep Learning Containers for serving, reducing operational overhead.

The examples illustrate both tabular ML and generative AI, showing the approach works across different workloads. The documentation includes prerequisites like having a SageMaker execution role and an S3 bucket, but the core value is clear: a more streamlined path from code to deployed model on SageMaker.

FAQ

Do I need to build my own Docker image to use script mode in SDK v3?
No, you can use any container image from Amazon ECR—your own, an AWS Deep Learning Container, or a third-party image. The SDK injects your code at runtime, so you don't have to bake it into the image.
What are the key differences between SDK v2 and v3?
SDK v3 replaces the framework-specific estimator classes (like SKLearn, PyTorch, XGBoost) with a single ModelTrainer for training and ModelBuilder for deployment. It also uses a SourceCode object for code injection and supports any container image, not just AWS managed ones.
Can I use script mode for both traditional machine learning and generative AI?
Yes, the post demonstrates both: a classic scikit-learn Random Forest training and a Stable Diffusion 3.5 fine-tuning with LoRA, using the same two core classes.
Amazon AI BlogRead Original Article

Get the latest Large Language Models news every morning

AI-summarized, only the topics you pick — one digest a day via Email, Slack, or Discord.

Free · takes 30 seconds · unsubscribe anytime

Ask AI

Ask AI anything about this article. Q&As are published on this page for other readers too.

Related Articles

Next articleApple's PROOF-Gen turns AI training failures into wins