Lesson 1 of 4 Amazon SageMaker AI

Building, Training and Deploying Models with Amazon SageMaker AI

This lesson explains how Amazon SageMaker AI, the fully managed AWS service for the whole machine learning lifecycle, prepares data and builds, trains, tunes, deploys and monitors models, without managing servers.

Learning outcomes

After completing this lesson, you will be able to:

  • Describe the SageMaker AI tools for building and training models, such as SageMaker Studio.
  • Describe the hosting options that SageMaker AI provides.
  • Distinguish SageMaker JumpStart, SageMaker Canvas and Autopilot.
  • Choose between Amazon Bedrock and SageMaker AI.

Building and training

SageMaker AI provides tools for each step of building and training models. SageMaker Studio is a web-based development environment, with JupyterLab notebooks and a code editor, for exploring data and running experiments. Training jobs run your training code, or a built-in algorithm, on managed instances that start for the job and shut down afterwards, so you pay only while training runs. Managed Spot Training uses spare capacity to lower that cost further.

For very large models, distributed training splits a job across many GPUs, and SageMaker HyperPod provides resilient clusters for training and fine-tuning foundation models over long periods. Automatic Model Tuning runs many training jobs with different hyperparameter values and finds the best combination. The following table summarises the features.

FeatureWhat it does
SageMaker StudioWeb IDE with JupyterLab and Code Editor for exploring data, experiments and models
Training jobsRun your code or a built-in algorithm on managed instances that shut down afterwards
Managed Spot TrainingLowers training cost
Distributed trainingSplits large jobs across GPUs
SageMaker HyperPodResilient clusters for training and fine-tuning very large foundation models
Automatic Model TuningSearches for good hyperparameters
Scenario questions

Training features

Exam skills 1.2.5 · 1.3.4

Choose the SageMaker AI feature for each training need.

Log in to try this activity Interactive activities are free with an account.

Hosting

SageMaker AI supports real-time, serverless, asynchronous and batch inference, with auto scaling, multi-model endpoints and deployment guardrails that shift traffic with blue/green or canary releases.

JumpStart, Canvas and Autopilot

Three SageMaker AI features reduce the effort needed to get a model, each for a different kind of user. SageMaker JumpStart, for data scientists, is a hub of pre-trained and open foundation models, such as Llama and Mistral, and solution templates; a model can be deployed or fine-tuned in a few clicks and runs in your own account. SageMaker Canvas, for business analysts, is a no-code interface to prepare data, build models such as sales forecasts, and use foundation models. SageMaker Autopilot automates machine learning (AutoML): it tries different algorithms and settings on your data and ranks the resulting models. The following table summarises the three features.

FeatureForWhat it does
SageMaker JumpStartData scientistsModel hub of pre-trained and open foundation models (Llama, Mistral, Falcon) and solution templates; deploy or fine-tune in a few clicks, in your own account
SageMaker CanvasBusiness analystsNo-code interface to prepare data, build models such as forecasts, and use foundation models
SageMaker AutopilotAnyoneAutoML: tries algorithms and settings and ranks candidate models

The broader Amazon SageMaker platform also includes Unified Studio, which brings data, analytics and AI together.

True or false

JumpStart, Canvas and Autopilot

Exam skills 1.2.5 · 1.3.2

Check four claims about three SageMaker AI features.

Log in to try this activity Interactive activities are free with an account.

Bedrock or SageMaker AI?

Amazon Bedrock and SageMaker AI both give access to models, but they suit different needs. Amazon Bedrock is the choice when you want to use foundation models through an API, with nothing to deploy or manage: you send a request and receive the model's answer. SageMaker AI is the choice when you need to train your own models, want full control of the model and how it is hosted, or want to run open models on dedicated instances. The following table summarises the choice.

ChooseWhen
Amazon BedrockYou want to call foundation models through an API with no infrastructure
SageMaker AIYou need to train your own models, want full control of the model and hosting, or want open models on dedicated instances
Sort into groups

Bedrock or SageMaker AI?

Exam skills 1.2.5 · 2.3.1

Decide which service each requirement points to.

Log in to try this activity Interactive activities are free with an account.
Worked example

Which SageMaker tool for which person

Three people in the same company want to use machine learning, with very different skills:

PersonGoalTool
A sales analyst with no coding skillsForecast next quarter's sales from a spreadsheetSageMaker Canvas (no code)
A developer who needs a text summariserDeploy an open-source model in the company's own account quicklySageMaker JumpStart
A data scientist with proprietary sensor dataBuild and train a custom failure-prediction modelSageMaker Studio with training jobs and Automatic Model Tuning

If the developer had only needed to call a summarisation model through an API, without hosting anything, Amazon Bedrock would have been simpler still. JumpStart is the better choice when the company wants the model deployed on its own SageMaker endpoint, perhaps to fine-tune it or control the instance type.

Check yourself

What does SageMaker JumpStart provide?

Show answer

Pre-trained models, including foundation models, and solution templates that can be deployed or fine-tuned with a few clicks.

Exam Tips

Remember for the exam

  • To build, train and deploy custom models with full control, use SageMaker AI.
  • To deploy or fine-tune pre-trained and open foundation models quickly in your own account, use SageMaker JumpStart.
  • No-code ML for business analysts is SageMaker Canvas.
  • Automatic model building (AutoML) is SageMaker Autopilot.
  • Large-scale clusters for training foundation models are provided by SageMaker HyperPod.
  • If you only need to call a foundation model through an API with no infrastructure, use Bedrock rather than SageMaker AI.