AWS AI Practitioner · 4 of 12

The machine learning lifecycle on SageMaker: from raw data to a monitored endpoint

The ten stages of a machine learning project from business goal to monitored endpoint, the SageMaker feature that owns each one, where models come from, how to put one in production, how to score it with the right metric, and the MLOps loop that keeps it honest.

Updated 2026-09-10AIF-C01 · Domain 1
On this page

A model is a small file at the end of a long road. Before it exists someone has to decide what question is worth answering, find the data, clean it, label it, shape it into features, pick an algorithm, train, tune, and prove the result is good enough; after it exists someone has to host it, watch it, and retrain it when the world moves on. Amazon SageMaker is the AWS service built around exactly that road, with one named feature for each step, and the exam tests the road twice: once as the stages of a lifecycle and once as "which SageMaker feature does this". This article walks the road from start to finish, stopping at each feature, at the metrics that decide whether a model is any good, and at the MLOps habits that keep it good.

The map

Read this first when short on time. Every branch is a section below.

Figure 1. The whole article on one page. Every branch is a section below; fold what you know, open what you do not.

The pipeline: ten stages from a business question to a watched model

The machine learning lifecycle is the ordered set of stages a model passes through, from deciding what to predict to noticing that the deployed model has gone stale, and it is a loop rather than a line because the last stage feeds the first.

The exam guide names the stages in one breath: business goal, data collection, exploratory data analysis, data pre-processing, feature engineering, model training, hyperparameter tuning, evaluation, deployment and monitoring. Different books merge or split them (AWS's own well-architected material folds them into "business goal, ML problem framing, data processing, model development, deployment, monitoring"), but the order is always the same and the content of each is stable. The first five are about data and take most of the calendar time; the next three are about the model and take most of the compute; the last two are about production and never end.

Amazon SageMaker (renamed Amazon SageMaker AI at the end of 2024, when "Amazon SageMaker" became the name of a wider data-and-AI studio; the exam and most documentation still say SageMaker) is a managed service with one feature for each stage. That mapping is the spine of this article and, in practice, of the exam: a scenario describes a stage in plain words and the answer is the feature that owns it.

The front door to all of it is Amazon SageMaker Studio, the browser-based development environment: JupyterLab notebooks and a code editor on managed compute, plus the visual views of experiments, pipelines, the model registry, endpoints and monitors, so a whole project is run from one window. Canvas (no code), JumpStart (the model hub) and Data Wrangler are applications inside it. When a question says "an integrated development environment for the whole ML workflow", Studio is the answer.

flowchart TD
  G["Stage 1 · Business goal<br/>what to predict, what success costs"]
  C["Stage 2 · Data collection<br/>S3, Glue, Athena, Ground Truth labels"]
  E["Stage 3 · Exploratory data analysis<br/>Data Wrangler insights report"]
  P["Stage 4 · Pre-processing<br/>clean, impute, encode, split"]
  F["Stage 5 · Feature engineering<br/>Feature Store, Processing jobs"]
  T["Stage 6 · Model training<br/>training job, built-in algorithms"]
  H["Stage 7 · Hyperparameter tuning<br/>Automatic Model Tuning"]
  V["Stage 8 · Evaluation<br/>metrics, Clarify, Experiments"]
  D["Stage 9 · Deployment<br/>endpoint or batch transform"]
  M["Stage 10 · Monitoring<br/>Model Monitor, CloudWatch"]
  G --> C --> E --> P --> F --> T --> H --> V --> D --> M
  V -. "not good enough: more data, other features" .-> F
  M -. "drift: collect fresh data, retrain" .-> C
Figure 2. The ten stages the exam names, with the SageMaker feature that owns each. The dotted arrows are the two loops every real project takes: evaluation that fails sends the team back to the data, and monitoring that detects drift restarts the cycle.

A useful way to hold the whole thing is as three questions. Is this worth predicting, and do we have the data? (stages 1 to 5). Can we build a model that predicts it well enough? (stages 6 to 8). Can we run it, and keep it good? (stages 9 and 10). Each question has a feature set, a metric set and a failure mode, and each is a section below.

StageWhat happensSageMaker feature (and friends)
Business goalFrame the question, pick a success metric, set a baselineNo feature; a document. Model Cards record the decision later
Data collectionGather, store, labelS3, AWS Glue, Athena, Kinesis; Ground Truth and Ground Truth Plus for labels
Exploratory data analysisLook at distributions, gaps, correlations, leakageData Wrangler (data quality and insights report), Studio notebooks
Data pre-processingClean, impute, normalise, encode, splitData Wrangler transforms, Processing jobs
Feature engineeringBuild and store the inputs the model will seeFeature Store (online and offline), Processing jobs
Model trainingFit the algorithm to the dataTraining jobs, built-in algorithms, JumpStart, Hugging Face containers, Debugger, Experiments
Hyperparameter tuningSearch the settings the algorithm cannot learnAutomatic Model Tuning; Autopilot and Canvas do it for you
EvaluationScore on held-out data, check bias and explanationsProcessing job for metrics, Clarify, Experiments, Model Registry
DeploymentPut the model where callers can reach itEndpoints (real-time, serverless, asynchronous), Batch Transform, Inference Recommender, Neo
MonitoringWatch data and predictions for drift, retrainModel Monitor, CloudWatch, Model Dashboard, Pipelines for retraining
In the wild
  • Amazon.com runs this loop for demand forecasting on every item it stocks: fresh sales data every day, retraining on a schedule, and forecasts that feed purchasing and warehouse placement; the DeepAR algorithm inside SageMaker came out of that work.
  • Netflix keeps the same shape with its own tooling: offline feature pipelines, thousands of training runs a day, A/B tests deciding what ships, and dashboards watching engagement after each launch.
  • Uber's Michelangelo platform was built explicitly as this pipeline, with a feature store, a training service, a model registry and monitoring, so that every team stopped re-inventing the stages.
Watch out

The stages are drawn as a chain but real projects spend most of their time cycling between stages 3 and 5: exploring, discovering a problem, cleaning again, building a feature, training a quick model, discovering another problem. Training itself is often the shortest stage. Budget accordingly, and be suspicious of any plan where "collect the data" is one line.

Exam angle

Two kinds of question. "Which stage does this activity belong to" (normalising a column is pre-processing, choosing the learning rate is tuning, checking recall on the test set is evaluation) and "which SageMaker feature performs this stage". Learn the table above until the feature names come unprompted: labels means Ground Truth, visual data preparation means Data Wrangler, shared reusable features mean Feature Store, drift means Model Monitor, orchestration means Pipelines.

Lifecycle
The ordered stages a machine learning system passes through, from framing the goal to monitoring in production and back.
Amazon SageMaker AI
The 2024 name for the SageMaker machine learning service; "Amazon SageMaker" now also names the unified studio that wraps it with analytics tools. Exam questions use the old, shorter name.
Artefact
Any file a stage produces for the next one: a cleaned dataset, a feature table, a trained model (model.tar.gz in S3), an evaluation report.

Framing the goal and collecting the data: S3, Glue, Athena and Ground Truth

The first two stages decide what to predict and gather the raw material for predicting it, and SageMaker's contribution here is labelling, because storage and querying are the job of the wider AWS data stack.

The business goal

A machine learning project starts as a business question, not a dataset: reduce fraud losses, cut churn, forecast demand within a tolerance, route support tickets faster. Framing turns that into a prediction problem (which technique, per the use-cases article), a success metric that the business will actually feel (money saved, tickets deflected) plus a model metric that stands in for it during development (recall, mean absolute error), and a baseline: the number the current process, or a trivial rule, already achieves. A model that does not beat the baseline is not a result. The framing also decides what an error costs, because that decides which metric matters later: a missed fraud costs the transaction, a false alarm costs a phone call, and the two are not equal.

Data collection

Data lands in Amazon S3, which is the data lake for every SageMaker feature: training jobs read from it, batch transform reads and writes it, Feature Store's offline half lives in it, Model Monitor writes reports to it. Around S3 sit the tools that make raw files usable: AWS Glue crawls the files and catalogues their schema and runs ETL jobs, Amazon Athena queries the files in place with SQL, Amazon Redshift holds the warehouse, Amazon Kinesis Data Streams and Data Firehose bring in events as they happen, and AWS Lake Formation governs who may read which columns. AWS Data Exchange is where third-party datasets are bought. The SageMaker side of collection is Data Wrangler's import step, which connects to S3, Athena, Redshift, Snowflake, Databricks and other sources without code.

Labelling with Ground Truth

Supervised learning needs a label on every training example, and most data arrives without one. Amazon SageMaker Ground Truth is the labelling service: you point it at the data, choose a task template (bounding boxes, image classification, semantic segmentation, text classification, named entities, video frames, 3D point clouds, or a custom template), and choose who labels. Three workforces are on offer: Amazon Mechanical Turk, a public crowd, cheap and fast but not for confidential data; a vendor workforce from AWS Marketplace, specialist companies under contract; and a private workforce, your own employees or contractors, for anything sensitive or requiring domain knowledge. Ground Truth can also run automated data labelling: it trains a model on the human labels as they arrive and lets that model label the items it is confident about, sending only the ambiguous ones to people, a technique called active learning that can cut labelling cost sharply on large datasets. Several people can label the same item and Ground Truth reconciles them by consensus, which is how label quality is controlled.

Ground Truth Plus is the turnkey version: you upload the data and describe what you need, AWS supplies and manages an expert workforce and the labelling workflow, and you review the results. It is the answer when a scenario wants high-quality labels "without building a labelling workflow or managing a workforce". Once the model is live, the same idea of putting humans in the loop for low-confidence predictions is Amazon Augmented AI (A2I), covered in the use-cases article.

NeedWorkforce or serviceExam keyword
Large, non-sensitive labelling job, lowest costGround Truth with Amazon Mechanical Turk"public", "crowdsourced"
Domain expertise, contracted qualityGround Truth with a vendor workforce"third-party vendor", "AWS Marketplace"
Confidential data, in-house expertsGround Truth with a private workforce"sensitive", "own employees"
Reduce labelling cost on a big datasetGround Truth automated data labelling"active learning", "automatically label"
No workforce and no workflow to manageGround Truth Plus"turnkey", "AWS-managed experts"
Review low-confidence predictions from a live modelAmazon A2I"human review of predictions"
In the wild
  • Autonomous-driving teams label millions of camera frames and lidar sweeps with bounding boxes and segmentation masks; Ground Truth's video and 3D point-cloud templates exist for them.
  • Medical imaging companies use private workforces of radiologists, because the label needs a specialist and the data cannot leave a controlled group.
  • Retail catalogues label product photos by category and attribute in bulk, the classic Mechanical Turk workload.
Watch out

Label quality caps model quality. A model trained on labels that are wrong ten percent of the time cannot be more than about ninety percent right, and no amount of tuning recovers that. Consensus labelling, gold-standard items mixed into the queue and a clear labelling guide are cheaper than the retraining they save.

Exam angle

"Label" or "annotate" in a scenario means Ground Truth. Then read the constraint: sensitive data or in-house experts points at a private workforce, cost on a huge set points at automated labelling, "no workforce to manage" points at Ground Truth Plus. Labelling data before training is Ground Truth; reviewing a model's predictions after deployment is A2I. Storage and querying questions (Glue, Athena, S3) are data-stack questions dressed as ML.

Baseline
The score the existing process or a trivial rule achieves. Every model is judged against it, not against zero.
Active learning
A loop where a model labels the examples it is sure of and asks humans only about the ones it is not, so human effort goes where it changes the most.
Consensus
Sending the same item to several labellers and keeping the majority answer, with disagreement as a signal of an ambiguous item or an unclear guide.

Exploring, cleaning and engineering features: Data Wrangler, Processing jobs and Feature Store

Stages three to five turn raw rows into the exact numeric inputs a model will learn from, and they are where most of a project's hours and most of its accuracy come from.

Exploratory data analysis

Exploratory data analysis (EDA) is looking before modelling: the distribution of every column, how many values are missing, which columns correlate with each other and with the target, how imbalanced the classes are, whether there are duplicates or obvious outliers, and whether any column is leakage, a value that would not be known at prediction time but sneaks in from the future (the "refund issued" flag in a fraud dataset). On SageMaker this is done in a Studio notebook with pandas and plots, or in Amazon SageMaker Data Wrangler, whose data quality and insights report produces the statistics, flags target leakage, duplicate rows, class imbalance and anomalous samples, and includes a quick model: a throwaway model trained on the spot to estimate how predictable the target is and which columns carry the signal. Data Wrangler started as a Studio tool and now lives inside SageMaker Canvas, so both names appear in questions.

Pre-processing

Pre-processing makes the data consistent and machine-readable: drop or impute missing values, remove duplicates, fix types, normalise or standardise numeric columns so no feature dominates by its units, encode categorical values as numbers (one-hot encoding turns "red, green, blue" into three 0/1 columns), tokenise text, resize images, and finally split the data into training, validation and test sets, stratified so each holds the same class mix. Data Wrangler offers several hundred of these as point-and-click transforms and exports the recipe as code, a Processing job, a Pipelines step or a Feature Store ingestion. When the data is too large for an interactive tool, a SageMaker Processing job runs the same script on a fleet of instances: it is a managed container run (scikit-learn, Spark or your own image) that reads from S3, does the work, writes to S3 and shuts down, and it is also how evaluation scripts run later in the pipeline.

Feature engineering

Feature engineering creates the inputs the model actually sees, which are rarely the raw columns: the age of an account rather than its creation date, the ratio of this transaction to the customer's average, the day of week, a rolling seven-day count, the embedding of a product description, a bin ("small, medium, large") instead of a raw number, or a dropped feature that only added noise. It is the stage where domain knowledge enters the model, and on tabular problems it moves accuracy more than the choice of algorithm does. Feature selection (keeping the columns that matter) and dimensionality reduction (compressing many columns into a few, PCA being the built-in algorithm for it) both live here.

Feature Store

Amazon SageMaker Feature Store is a purpose-built repository for engineered features, and it exists to solve a specific production problem: the features computed for training must be exactly the features computed at inference, or the model sees a world it was not trained on (training-serving skew). Features are grouped into feature groups, each row identified by a record identifier and an event time. Every group can have two stores. The online store is a low-latency key-value store read at inference time: the endpoint asks for the latest features of customer 4711 and gets them in single-digit milliseconds. The offline store is the full history in S3 (Parquet, catalogued in Glue, queryable with Athena) used to build training sets, including point-in-time queries that reconstruct exactly what was known about each row at the moment its label happened. Write once, and both stores are fed; teams discover and reuse each other's features instead of recomputing them.

flowchart TD
  R["Raw data in S3<br/>events, tables, logs"] --> J["Processing job or Data Wrangler<br/>compute features, one definition"]
  J --> FG["Feature group<br/>record id, event time, features"]
  FG --> ON["Online store<br/>latest value per record, milliseconds"]
  FG --> OFF["Offline store in S3<br/>full history, Athena, point-in-time"]
  OFF --> TR["Training job<br/>builds the training set"]
  ON --> EP["Endpoint<br/>fetches features at inference"]
Figure 3. Feature Store computes a feature once and serves it twice: the offline store in S3 feeds training with full history, the online store feeds the endpoint with the latest value, so training and serving see the same numbers.
Online storeOffline store
HoldsLatest feature values per recordEvery value ever written, with event time
Read byEndpoints at inference, by keyTraining and analysis, by query
LatencyMillisecondsSeconds to minutes (Athena, Spark)
Backed byManaged low-latency storeS3 in Parquet, Glue Data Catalog
Exam keyword"real-time", "low-latency feature lookup""historical", "training dataset", "point-in-time"
In the wild
  • Uber's Michelangelo introduced the feature store idea (its store was called Palette) so that the "rides in this hexagon in the last hour" feature computed for a training set was the same code that served the dispatch model in production.
  • Airbnb's Zipline and Netflix's feature pipelines solve the same skew problem: one definition, backfilled history for training, fresh values for serving.
  • Banks running fraud models keep per-card aggregates (spend in the last ten minutes, distance from last transaction) in an online store, because those features must be fetched in the milliseconds the terminal waits.
Watch out

Fit scalers and encoders on the training split only, then apply them to validation and test. Fitting on the whole dataset leaks information about the test set into training and gives an evaluation that is quietly too good. The same rule applies to imputation: the mean used to fill gaps must come from training data alone.

Exam angle

"Visual", "no code", "prepare data", "hundreds of transformations" or "data quality report" points at Data Wrangler. "Run a preprocessing script at scale" or "evaluation step in a pipeline" is a Processing job. "Reuse features across teams", "consistent features for training and inference" or "low-latency feature lookup" is Feature Store, and the online/offline pairing is a favourite: real-time reads are the online store, training sets come from the offline store.

Leakage
A training feature that carries information about the label which would not exist at prediction time. The model looks brilliant offline and useless live.
Training-serving skew
A difference between how features are computed for training and how they are computed at inference, so the model receives inputs it never learned from.
One-hot encoding
Turning a categorical column with k values into k columns of 0 and 1, one per value.
Point-in-time query
Rebuilding a training row using only feature values that existed at that row's event time, so no future information leaks in.

Where the model comes from: your own training, JumpStart, Hugging Face and open source

A model in SageMaker arrives by one of four routes, and choosing the route is a question of how specific the task is, how much data and expertise the team has, and whether the weights must stay in your account.

Train a custom model when the target is your own (churn, yield, default) and the data is your own. SageMaker gives three ways to do it, in rising order of control: a built-in algorithm where you only supply data and hyperparameters, script mode where you write a training script in PyTorch, TensorFlow, scikit-learn, XGBoost or Hugging Face and SageMaker supplies the framework container, and bring your own container where you package anything that can read from S3 and write a model. The next section covers the training job itself.

Amazon SageMaker JumpStart is the model hub inside Studio: hundreds of pre-trained open-source models (vision, text, tabular, and foundation models such as Llama, Falcon, Mistral, Stable Diffusion and many Hugging Face models) plus solution templates that stand up an entire use case (fraud detection, demand forecasting, document understanding) with the pipelines and endpoints already wired. Any model can be deployed to an endpoint in a few clicks, and most can be fine-tuned on your data with the same interface. JumpStart is the answer when the scenario wants a proven model quickly, wants to fine-tune rather than train from scratch, or wants a foundation model whose weights stay inside the customer's account rather than being called through Amazon Bedrock. Bedrock and its trade-offs are the subject of the Bedrock article.

Hugging Face on SageMaker is a partnership rather than a separate feature: AWS ships Deep Learning Containers with the transformers library installed, the SageMaker Python SDK has a HuggingFace estimator and model class, and any model on the Hugging Face Hub can be pulled by name into a training job or an endpoint. It is how a team takes BERT, a sentence-embedding model or a small LLM and fine-tunes or hosts it without building a container.

Open-source pre-trained models more broadly, from PyTorch Hub, TensorFlow Hub or a research repository, can be uploaded to S3 as a model.tar.gz with an inference script and hosted on any SageMaker endpoint. This is the route when a specific paper's weights are needed or when a model trained elsewhere is being brought onto AWS.

SourceBest whenEffortExam keyword
Custom training (built-in, script mode, own container)The target and data are unique to the businessHighest: data, training, tuning, hosting"proprietary data", "own algorithm", "full control"
JumpStartA proven model exists; fine-tune or deploy it fast; FM weights must stay in the accountLow: clicks or a few SDK lines"pre-trained", "quickly deploy", "fine-tune with minimal effort", "solution template"
Hugging Face on SageMakerA transformer model from the Hub, to fine-tune or hostLow to medium: estimator plus a script"Hugging Face", "transformers", "Hub"
Open-source weights from anywhereA specific published model, or one trained off-AWSMedium: package and write an inference handler"bring an existing model", "trained elsewhere"
Managed API (Bedrock, AI services)No training and no hosting wanted at allLowest"least operational overhead", "no ML expertise"
In the wild
  • JumpStart is where many teams first ran Llama 2 and Falcon on AWS: one click to an endpoint on GPU instances in their own VPC, before the same models arrived in Bedrock.
  • Hugging Face's Hub hosts hundreds of thousands of models; the SageMaker integration means a sentiment model or a multilingual embedding model is a model id away from a production endpoint.
  • Stability AI's Stable Diffusion was available through JumpStart for image generation with the weights under the customer's control, the typical reason to prefer self-hosting over an API.
Watch out

"Pre-trained" does not mean "free to run". A JumpStart foundation model on an endpoint bills for the GPU instances every hour it is up, whether anyone calls it or not. For sporadic use the managed API route (Bedrock) is cheaper; self-hosting wins when utilisation is high, when the weights must not leave the account, or when the model is one Bedrock does not offer.

Exam angle

The exam contrasts training from scratch with starting from a pre-trained model, and the pre-trained answer almost always wins on speed and cost when the scenario allows it. "Deploy a pre-trained model with minimal effort" or "solution template" is JumpStart; "a model from the Hugging Face Hub" is the Hugging Face integration; "fine-tune a foundation model and keep it in our VPC" is JumpStart rather than Bedrock; "no hosting at all" is Bedrock or a managed AI service.

Pre-trained model
A model whose weights were learned on a large general dataset by someone else; you use it as is or fine-tune it on your own data.
Fine-tuning
Continuing training of a pre-trained model on a smaller, specific dataset so it adapts to your task; detailed in the customising article.
Script mode
Supplying only a training script; SageMaker provides the framework container and the machines.

Training and tuning: training jobs, built-in algorithms, Automatic Model Tuning, Autopilot and Canvas

A SageMaker training job is a container run on machines SageMaker provisions, fed from S3 and writing a model back to S3; everything else in this section (algorithms, tuning, AutoML, debugging, experiment tracking) is a layer around that one primitive.

The training job

A training job needs four things: an algorithm image (a container in Amazon ECR, built-in or yours), the S3 location of the training and validation data, an instance type and count, and a set of hyperparameters. SageMaker starts the instances, pulls the image, downloads or streams the data (File mode copies it first, Pipe and FastFile modes stream it so the job starts sooner), runs the container, captures its logs and metrics into Amazon CloudWatch, uploads the result to S3 as model.tar.gz, and terminates the instances, so you pay only for the training seconds. Managed Spot Training runs the job on spare capacity for a large discount (AWS quotes up to ninety percent) at the cost of possible interruption, which is why the script should write checkpoints to S3 so an interrupted job resumes rather than restarts. For models too large for one machine, SageMaker's distributed training libraries split the data (data parallel) or the model (model parallel) across a cluster, and SageMaker HyperPod is the resilient cluster offering for training foundation models over weeks.

flowchart TD
  D["Training data in S3<br/>train and validation splits"] --> J
  I["Algorithm container in ECR<br/>built-in, framework or your own"] --> J
  HP["Hyperparameters<br/>learning rate, depth, epochs"] --> J
  J["Training job<br/>ml instances start, run, stop"]
  J --> CW["CloudWatch<br/>logs and training metrics"]
  J --> A["model.tar.gz in S3<br/>the trained artefact"]
  A --> REG["Model Registry<br/>versioned, approval status"]
Figure 4. Anatomy of a training job. Data, container and hyperparameters go in; a model artefact in S3 and metrics in CloudWatch come out; the artefact is registered so later stages can find and approve it.

Built-in algorithms

SageMaker ships a shelf of built-in algorithms, tuned implementations that need no code, only data in the expected format and hyperparameters. The exam names a few by their signature use.

AlgorithmLearning typeUse it forExam keyword
XGBoostSupervised, tabularClassification and regression on rows and columns; the default first choice on tabular data"gradient boosted trees", "tabular", "churn", "fraud"
Linear LearnerSupervisedLinear and logistic regression at scale, many models trained in parallel"linear regression", "binary classification, simple"
K-Nearest Neighbours (k-NN)SupervisedClassify or regress by the nearest training examples"similar items"
Factorization MachinesSupervisedSparse data such as click prediction and recommendations"sparse", "click-through"
K-MeansUnsupervisedClustering into k groups"segment customers", "no labels"
Principal Component Analysis (PCA)UnsupervisedDimensionality reduction"reduce the number of features"
Random Cut ForestUnsupervisedAnomaly detection in numeric data and streams"anomalies", "unusual values"
IP InsightsUnsupervisedUnusual IP address and account pairings"suspicious logins"
DeepARSupervised, time seriesForecasting many related time series with one recurrent model"forecast", "time series", "seasonality"
BlazingTextTextWord2vec embeddings and fast text classification"word embeddings", "text classification"
Object2VecEmbeddingsLearn embeddings for pairs of things (users and items, sentences)"embeddings of pairs"
Sequence-to-SequenceTextTranslation, summarisation, speech to text"sequence in, sequence out"
Neural Topic Model, LDAUnsupervised, textDiscover topics in a corpus"topics in documents"
Image Classification, Object Detection, Semantic SegmentationSupervised, visionLabel a whole image, box the objects, label every pixel"images", "bounding boxes", "pixel-level"

Hyperparameter tuning with Automatic Model Tuning

Hyperparameters are the knobs the algorithm does not learn: learning rate, tree depth, number of trees, regularisation strength, batch size, number of epochs, number of clusters. Amazon SageMaker Automatic Model Tuning (AMT, also called hyperparameter optimisation or HPO) runs many training jobs with different settings and keeps the best by an objective metric you name (validation AUC, validation RMSE). You give it the ranges to search, the maximum number of jobs and how many to run in parallel, and a strategy.

StrategyHow it picks the next settingsTrade-off
Grid searchTries every combination of the listed valuesExhaustive and predictable, explodes combinatorially; AMT supports it only for categorical parameters
Random searchSamples settings at random from the rangesSimple, embarrassingly parallel, surprisingly effective; wastes jobs on bad regions
Bayesian optimisationBuilds a model of "settings to score" from the jobs so far and chooses the next most promising pointFewest jobs to a good answer; sequential, so less parallel; the AMT default
HyperbandStarts many jobs, stops the poor ones early and gives the budget to the good onesFast for iterative algorithms (deep learning) where early epochs predict final quality

Two economies matter: early stopping kills a training job whose metric is clearly worse than the best so far, and warm start seeds a new tuning job with the results of a previous one instead of beginning blind. Tuning is expensive by construction (it is training multiplied), so the ranges should be narrow and informed, and the objective metric must be computed on validation data, never on the training set.

Autopilot and Canvas: the automated and the no-code routes

Amazon SageMaker Autopilot is AutoML: give it a tabular dataset and a target column and it does exploration, pre-processing, algorithm selection, training and tuning by itself, producing a leaderboard of candidate models ranked by the objective metric, plus generated notebooks that show exactly what it did, so the result is transparent and editable rather than a black box. It can run in a hyperparameter-tuning mode, an ensembling mode (which combines several models) or choose automatically. Amazon SageMaker Canvas is the no-code front: a visual application for business analysts that connects to data, prepares it (Data Wrangler lives here now), builds models with Autopilot underneath, explains predictions, and also gives point-and-click access to ready-to-use models (Rekognition, Comprehend, Textract behind the scenes) and to foundation models. Canvas produces a model that can be shared into Studio and deployed like any other.

Automatic Model TuningAutopilotCanvas
WhoData scientist with a chosen algorithmData scientist or developer who wants the algorithm chosen tooBusiness analyst, no code
AutomatesHyperparameter search onlyPre-processing, algorithm choice, training, tuningThe whole flow behind a visual interface
OutputBest training job by objective metricRanked candidates plus explanatory notebooksA model, predictions, explanations; export to Studio
Exam keyword"tune hyperparameters", "Bayesian""AutoML", "automatically build", "leaderboard", "transparency""no code", "business analysts", "visual"

Debugger and Experiments

Two features watch the training itself. Amazon SageMaker Debugger captures tensors and metrics from inside the job while it runs and applies built-in rules (vanishing or exploding gradients, loss not decreasing, overfitting, class imbalance, poor weight initialisation, low GPU utilisation); a triggered rule can stop the job and send a notification through Amazon SNS, so a broken run does not burn a night of GPU time. Its profiler reports CPU, GPU, memory and I/O utilisation so an under-used expensive instance is spotted. Amazon SageMaker Experiments records every run's parameters, inputs, metrics and artefacts and lets them be compared side by side in Studio, which is how "which of the forty runs last week had the best recall, and what were its settings" is answered without a spreadsheet.

In the wild
  • XGBoost has won more tabular data competitions than any other algorithm and is the SageMaker built-in most likely to appear in a churn, credit or fraud scenario.
  • Amazon's own forecasting produced DeepAR, a single neural model trained across all products at once rather than one model per product, which is why it copes with new items that have little history.
  • Foundation model labs use the distributed libraries and HyperPod to train across hundreds of GPUs for weeks, with checkpoints so a node failure costs minutes rather than the run.
Watch out

Autopilot and Canvas are not "for beginners only"; they are also the fastest way for an expert to get a strong baseline on a new tabular problem. But they are tabular-first: a scenario about images, audio or free text with custom labels is a training job or JumpStart fine-tune, not Canvas. And AutoML does not fix bad data; it will happily tune a model on a leaked feature.

Exam angle

Match the verb. "Tune hyperparameters" is Automatic Model Tuning, with Bayesian as the efficient strategy and grid as the exhaustive one. "Automatically build and select the best model" is Autopilot; add "without writing code" or "business analysts" and it is Canvas. "Detect training problems such as vanishing gradients" or "stop a wasteful training job" is Debugger. "Track and compare training runs" is Experiments. "Reduce training cost" with interruption tolerated is Managed Spot Training with checkpoints. "Forecast" among built-ins is DeepAR, "anomalies" is Random Cut Forest, "text classification or word vectors" is BlazingText.

Hyperparameter
A setting chosen before training that shapes how learning happens (learning rate, depth, epochs), as opposed to a parameter (a weight) the training learns.
Objective metric
The single validation metric a tuning job maximises or minimises to rank its training jobs.
Checkpoint
A snapshot of the model mid-training saved to S3, so an interrupted spot job resumes from it.
AutoML
Automating algorithm selection, pre-processing and tuning end to end from a dataset and a target column; Autopilot is SageMaker's.

Judging a classifier: the confusion matrix, precision, recall, F1 and AUC

Every classification metric is a ratio of the four counts in the confusion matrix, and the right metric is the one that weights the kind of mistake the business cannot afford.

Evaluation happens on the test set, data the model never saw during training or tuning, so the score predicts how it will do on new data. For a binary classifier each test example falls into one of four cells. A true positive (TP) is a real positive the model called positive: the fraud it caught. A false positive (FP) is a negative the model wrongly called positive: the honest customer whose card was declined, a false alarm, a type I error. A false negative (FN) is a positive the model missed: the fraud that went through, a type II error. A true negative (TN) is a negative correctly left alone. Laid out in a two-by-two grid they are the confusion matrix, and everything else is arithmetic on it.

Actual class positive (fraud) negative (honest) Predicted class positive negative TP true positive fraud caught FP false positive false alarm, type I FN false negative fraud missed, type II TN true negative honest left alone green: right, amber: the two kinds of wrong Accuracy (TP + TN) / (TP + FP + FN + TN) all the right calls over all the calls Precision TP / (TP + FP) of the ones flagged, how many were right Recall (sensitivity, TPR) TP / (TP + FN) of the real positives, how many were caught F1 2 × precision × recall / (precision + recall) harmonic mean: high only when both are high
Figure 5. The confusion matrix for a fraud model and the four metrics built from it. Precision reads across the "predicted positive" row; recall reads down the "actual positive" column.

Accuracy, and why it lies

Accuracy is the share of all predictions that were right: (TP + TN) over everything. It is the metric everyone understands and the one that misleads most often, because of class imbalance. If one transaction in a thousand is fraud, a model that says "honest" to everything is 99.9 percent accurate and catches nothing. Accuracy is fine when the classes are roughly balanced and both kinds of error cost about the same; otherwise reach for the next two.

Precision and recall

Precision is TP over (TP + FP): of everything the model flagged as positive, the fraction that really was. High precision means few false alarms. Recall (also sensitivity, or true positive rate) is TP over (TP + FN): of everything that really was positive, the fraction the model caught. High recall means few misses. The two pull against each other through the decision threshold: a classifier outputs a probability and a threshold turns it into a yes or no; lower the threshold and more things are flagged, so recall rises and precision falls; raise it and the reverse. Which to favour is a business decision made in stage one. When a false negative is costly (a missed cancer, a missed fraud, a missed fault in a jet engine) optimise recall and accept more false alarms. When a false positive is costly (a legitimate email in the spam folder, a good customer's card declined, an innocent person flagged) optimise precision and accept some misses. Specificity, TN over (TN + FP), is recall's mirror for the negative class and shows up in medical contexts.

F1, AUC-ROC and log loss

F1 is the harmonic mean of precision and recall, 2PR over (P + R): one number that is high only when both are high, so it is the summary metric for imbalanced problems where neither error type dominates. The harmonic mean punishes lopsidedness: precision 1.0 with recall 0.1 gives an F1 of about 0.18, not the 0.55 an average would suggest. AUC-ROC (area under the receiver operating characteristic curve) judges the classifier across all thresholds at once: the ROC curve plots true positive rate against false positive rate as the threshold slides from strict to lenient, and the area under it is the probability that the model ranks a random positive above a random negative. AUC of 1.0 is a perfect ranker, 0.5 is a coin toss, below 0.5 means the labels are inverted. It is the metric to compare models before a threshold has been chosen, a common objective metric for Automatic Model Tuning on binary problems, and one of the columns on every Autopilot leaderboard (whose default objective for binary classification is F1). Log loss (cross-entropy) scores the probabilities themselves rather than the decisions: a confident wrong prediction (0.95 for an honest transaction that was fraud) is punished far more than a hesitant one, so it rewards models that are well calibrated. Lower is better, and it is the training loss of most classifiers as well as an evaluation metric.

MetricFormula in wordsUse it whenExam keyword
AccuracyRight calls over all callsClasses balanced, errors cost the same"overall correctness", trap answer for imbalanced data
PrecisionOf those flagged positive, share truly positiveFalse positives are costly: spam filter, content takedown, declining a card"minimise false positives", "avoid false alarms"
RecallOf the truly positive, share flaggedFalse negatives are costly: fraud, disease screening, safety faults"minimise false negatives", "catch every case"
F1Harmonic mean of precision and recallImbalanced classes, both errors matter, one number wanted"balance precision and recall", "imbalanced dataset"
AUC-ROCArea under TPR versus FPR across thresholdsCompare models before choosing a threshold; ranking quality"across all thresholds", "0.5 is random", "ranking"
Log lossPenalty on the predicted probabilities, heavier for confident mistakesThe probabilities themselves matter (calibration, ranking by risk)"probability estimates", "cross-entropy"
SpecificityOf the truly negative, share correctly clearedPaired with recall in medical tests"true negative rate"
In the wild
  • Card fraud models at banks are tuned for recall with a precision floor: a missed fraud is a direct loss, a false alarm is a text message asking "was this you?", so the threshold sits low and a second, stricter stage decides which alerts a human sees.
  • Email spam filters at Gmail-scale providers are tuned for precision: a legitimate email lost to the spam folder is a worse failure than one spam message in the inbox.
  • Medical screening tests are recall-first by design; a positive screen leads to a more specific follow-up test, which is exactly the two-stage pattern fraud teams use.
  • Amazon SageMaker Autopilot reports accuracy, F1, AUC and log loss for every candidate and lets you pick which one to rank the leaderboard by.
Watch out

Never evaluate on data that was used for training or for choosing hyperparameters; the number will be flattering and wrong. The split is three-way for a reason: train on the training set, tune on the validation set, report once on the test set. And do not report accuracy alone on an imbalanced problem; the exam plants that as the wrong answer more often than any other metric.

Exam angle

Find the sentence about the cost of a mistake. "Missing a fraudulent transaction is unacceptable" or "must identify every patient" means recall. "Legitimate emails must never be marked spam" or "false alarms are expensive to investigate" means precision. "Dataset is highly imbalanced" plus "single metric" means F1, and "accuracy" is the distractor. "Evaluate regardless of threshold" or "compare classifiers' ranking ability" means AUC-ROC. Be ready to compute one metric from a small confusion matrix given as numbers.

Confusion matrix
The two-by-two (or k-by-k) table of predicted class against actual class whose cells are TP, FP, FN and TN.
Threshold
The probability above which a classifier says "positive". Moving it trades precision against recall.
ROC curve
True positive rate plotted against false positive rate for every threshold; the area under it is AUC.
Calibration
Whether a predicted probability of 0.8 comes true about eighty percent of the time. Log loss rewards it; accuracy ignores it.

Judging a regressor: MAE, MSE, RMSE, MAPE and R squared

A regression model predicts a number, so its errors are distances rather than categories, and the metrics differ in how hard they punish a big miss and whether they speak in the target's units.

For each test row the residual is predicted minus actual. Mean absolute error (MAE) averages the absolute residuals: on average the forecast is off by 12 units. It is in the target's units, easy to explain, and treats a miss of 100 as exactly ten times as bad as a miss of 10, so it is robust to a few outliers. Mean squared error (MSE) averages the squared residuals, so a miss of 100 counts 10,000 against a miss of 10 counting 100: large errors dominate, which is what you want when one big miss really is worse than many small ones, and it is the loss most regressors minimise during training because it is smooth. Its units are squared, which is awkward, so root mean squared error (RMSE) takes the square root to return to the target's units while keeping the outlier sensitivity. RMSE is always at least as large as MAE, and the gap between them is a quick measure of how many large misses there are.

Mean absolute percentage error (MAPE) averages the absolute residual divided by the actual value, giving a percentage that is comparable across series of different scales (a forecast that is 8 percent off for both a bestseller and a slow item). Its weakness is actual values near zero, where a small miss becomes an enormous percentage, and it is undefined at zero, which is why demand forecasting for intermittent items uses weighted variants. R squared (the coefficient of determination) is the fraction of the variance in the target that the model explains: 1.0 means perfect prediction, 0 means no better than always predicting the mean, and it can go negative for a model worse than that. It is scale-free and good for "how much of what is going on does this model capture", but it says nothing about the size of errors in real units, and adding features never lowers it, which is why adjusted R squared exists to penalise pointless features.

MetricFormula in wordsUnitsBig errorsUse it when
MAEAverage of the absolute missesSame as targetCounted linearly; robust to outliersEvery unit of error costs the same; you want a number to explain
MSEAverage of the squared missesTarget squaredPunished heavilyTraining loss; large misses are disproportionately bad
RMSESquare root of MSESame as targetPunished heavilyReporting when big misses matter; the usual default
MAPEAverage of absolute miss as a share of the actualPercentLinear, but explodes near zero actualsComparing forecasts across scales; business audiences
R squaredShare of target variance the model explainsNone, 0 to 1IndirectJudging fit overall; comparing models on the same data
In the wild
  • Retail demand forecasting (Amazon, and Amazon Forecast's reports) leans on weighted quantile losses and MAPE-style percentages because a buyer thinks in "percent over or under", and because over- and under-forecasting cost different things (warehouse space versus a lost sale).
  • Zillow's home value estimates are reported as a median percentage error, a MAPE cousin, because a $20,000 miss means something different on a $200,000 house and a $2 million one.
  • Delivery time predictions at food and parcel companies are judged by MAE in minutes, the number a customer actually feels, with RMSE watched to catch the occasional wildly late estimate.
Watch out

A low R squared is not automatically a bad model and a high one is not automatically good: noisy targets (stock returns) have low ceilings, and a leaked feature gives an R squared near 1. Always look at RMSE or MAE in real units alongside it, and plot residuals against predictions to see whether the errors grow with the value.

Exam angle

Classification metrics for a category, regression metrics for a number; a question that offers "accuracy" for a price prediction is testing that boundary. Within regression: "in the same units as the target" is MAE or RMSE, "penalise large errors more" is RMSE or MSE, "percentage" is MAPE, "how much variance is explained" is R squared.

Residual
Predicted value minus actual value for one row; the raw material of every regression metric.
Outlier
A row whose value is far from the rest; squared-error metrics let a few of them dominate the score.
Variance explained
How much of the spread in the target the model's predictions account for; R squared is this as a fraction.

Judging the project: cost per user, return on investment and the other business metrics

Model metrics say whether the model predicts well; business metrics say whether the project was worth doing, and the exam expects both to be named and kept apart.

A model is a means. The end is a business outcome, and the business outcome is measured in the business's own terms. Return on investment (ROI) is the headline: the value the model creates (fraud losses avoided, hours of manual review removed, extra sales from better recommendations) minus what it cost, divided by what it cost. Its inputs are the rest of the list. Development costs cover people, labelling, compute for training and tuning, and the tooling; they are mostly one-off but recur at every retrain. Cost per user (or per prediction, per transaction) is the running cost of inference divided by the volume served, and it is the number that decides between an always-on endpoint and a batch job, or between a large model and a distilled one. Customer feedback is the qualitative signal: ratings, complaints, support tickets, survey scores, thumbs up and down on a chatbot answer; it catches failures no metric was defined for. Time to market is how long from the idea to the first version in front of users, which is the argument for managed services, pre-trained models and AutoML over training from scratch. Revenue lift (or conversion lift, retention lift) is the direct measurement of the outcome, established by an A/B test that gives one group the model and another the old process and compares the business number, not the F1.

The link between the two families is the thing to be able to explain. A recall improvement from 0.80 to 0.90 on a fraud model is a model metric; turned into "an extra twelve percent of fraud losses prevented, worth this much per month, against the extra false alarms costing this much in calls" it is a business metric, and only the second version justifies the project. Conversely a model that improves F1 by two points and changes no business number is a cost. Setting the business metric in stage one, and the model metric as its stand-in, is what stops a team optimising the wrong thing for six months.

Business metricWhat it measuresWhich lifecycle choice moves it
Return on investmentValue created minus cost, relative to costEverything; the metric the sponsor reads
Development costsPeople, labelling, training compute, toolingPre-trained versus from scratch, AutoML, spot training, managed services
Cost per user or per predictionInference spend divided by volumeEndpoint type, instance size, model size, batch versus real-time
Customer feedbackRatings, complaints, satisfaction scoresModel quality, latency, explanations, human review
Time to marketIdea to first usersManaged API versus custom model, JumpStart, Canvas
Revenue or conversion liftChange in the outcome, measured by A/B testModel quality, and whether the prediction is acted on
In the wild
  • Netflix has said for years that its recommendation system is judged by retention and by hours watched in A/B tests, not by offline ranking metrics, and that offline gains often fail to show up online.
  • Amazon.com measures recommendation and search changes by click-through and purchase lift in controlled experiments; a model is a winner when the business number moves.
  • Banks report fraud models to the board as losses prevented and false-decline rate, both in currency, and translate a recall figure into those before anyone sees it.
Watch out

Model metrics can improve while business metrics fall. A recommendation model that raises click-through by promoting sensational items may lower retention; a fraud model that raises recall may drive good customers away with false declines. The A/B test on the business metric is the final judge, and it needs enough users and time to be statistically meaningful.

Exam angle

Questions sort metrics into "model performance" (accuracy, F1, RMSE) and "business" (ROI, cost per user, customer feedback, time to market, revenue lift). A scenario asking how to "measure the business value" of a model wants the second family; one asking whether the model is "good enough" wants the first. "Lowest cost per prediction" with no latency requirement is batch inference; "fastest time to market" is the managed or pre-trained option.

A/B test
Splitting users at random between the new model and the old process and comparing an outcome metric, so the difference can be attributed to the model.
Lift
The improvement in an outcome (revenue, conversion, retention) attributable to the model, usually from an A/B test.
Baseline cost
What the outcome costs today, without the model; ROI is measured against it.

Deployment: managed API or self-hosted, and the four ways SageMaker serves a model

Deployment puts the trained artefact where callers can reach it, and the choice runs along two axes: whether you host the model at all, and, if you do, whether callers wait, how big their requests are and how steady their traffic is.

Managed API versus self-hosted

A managed API service (the AI services in the use-cases article, Amazon Bedrock for foundation models) hosts the model for you: no instances, no scaling, no patching, pay per call. A self-hosted model on a SageMaker endpoint gives control over the model, its version, its hardware, its network placement and its data handling, at the price of owning capacity and operations. The exam's keywords for the first are "least operational overhead" and "no ML expertise"; for the second "custom model", "specific instance type", "the model must stay in our VPC" and "high, steady volume where per-call pricing costs more than instances".

The four SageMaker serving options

The fundamentals article introduced batch versus real-time inference as concepts; here are the SageMaker products that implement them. A real-time endpoint keeps the model loaded on instances you choose, answers synchronous HTTPS requests in milliseconds, and supports auto scaling on invocations per instance; payloads are small (about 6 MB) and each call must finish within about a minute. Serverless Inference is a real-time endpoint on capacity SageMaker manages: pick a memory size, get a URL, pay per millisecond of compute and per request, and scale to zero between calls, with a cold start when traffic resumes, a slightly smaller payload limit and the same one-minute cap. Asynchronous Inference queues each request, processes it and writes the result to S3, notifying through Amazon SNS; it takes payloads up to about a gigabyte and processing times up to about an hour, and scales its instances to zero when the queue is empty. Batch Transform is not an endpoint at all: a job that reads a dataset from S3, runs the model on temporary instances, writes the predictions to S3 and stops, the cheapest and simplest way to score everything when nobody is waiting.

Real-time endpointServerless InferenceAsynchronous InferenceBatch Transform
LatencyMilliseconds, steadyMilliseconds when warm, seconds on cold startSeconds to about an hourMinutes to hours for the whole set
PayloadSmall, about 6 MBSmall, about 4 MBLarge, up to about 1 GBWhole datasets in S3
Traffic patternSteady, predictable, needs an instant answerIntermittent, spiky, unpredictableBursty with big or slow itemsPeriodic, scheduled, offline
Cost modelInstances billed while running, idle or notPer request and per millisecond of compute, zero when idleInstances, scale to zero when the queue is emptyInstances only for the job's duration
Result returnedIn the responseIn the responseWritten to S3, SNS notificationWritten to S3
Exam keyword"immediately", "interactive", "consistent low latency""intermittent", "idle periods", "no infrastructure", "scale to zero""large payload", "long processing", "queue", "notify when done""entire dataset", "overnight", "no endpoint", "lowest cost"
flowchart TD
  Q1{"Someone waiting?"}
  Q1 -- "no, score a dataset" --> BT["Batch Transform<br/>S3 in, S3 out, no endpoint"]
  Q1 -- "yes" --> Q2{"Payload large?"}
  Q2 -- "yes, or slow to process" --> AS["Asynchronous Inference<br/>queue, result to S3, SNS"]
  Q2 -- "no" --> Q3{"Traffic steady?"}
  Q3 -- "yes" --> RT["Real-time endpoint<br/>instances always on, auto scaling"]
  Q3 -- "no, spiky or rare" --> SL["Serverless Inference<br/>scales to zero, cold starts"]
Figure 6. Choosing among the four serving options with three questions: is anyone waiting, how big and slow is each request, and how steady is the traffic.

Sharing, rolling out and sizing an endpoint

A multi-model endpoint hosts many models behind one endpoint on shared instances, loading each from S3 into memory on first use and evicting cold ones, which is how a company with one small model per customer or per region avoids one endpoint per model. Multi-container endpoints run up to fifteen different containers on one endpoint with direct invocation of each; inference pipelines chain containers in series so a preprocessing step, the model and a post-processing step run as one call. Inference components let several foundation models share one endpoint's accelerators with per-model resource allocation.

Rolling out a new version safely uses production variants: two model versions behind one endpoint with a traffic split (90/10) for an A/B test, or a shadow variant that receives a copy of every request and whose responses are logged but never returned, so a new model is tested on live traffic with zero user impact. Deployment guardrails do blue/green deployments with all-at-once, canary (a small slice first) or linear (step by step) traffic shifting, and roll back automatically when a CloudWatch alarm fires. Before any of that, Amazon SageMaker Inference Recommender load-tests the model across instance types and configurations and recommends the one that meets a latency target at the lowest cost, replacing guesswork about whether the endpoint needs a GPU.

The edge

Some models run on the device rather than in the cloud, for latency, privacy or missing connectivity. Amazon SageMaker Neo compiles a trained model for a specific target (ARM and Intel CPUs, Nvidia GPUs, AWS Inferentia, various embedded chips), producing a smaller, faster binary with no accuracy change; SageMaker Edge Manager was the fleet service that packaged, deployed and monitored those models on devices (AWS has since wound it down, but the name still appears in study material), and AWS IoT Greengrass is the runtime that executes them on the device.

In the wild
  • Product recommendation endpoints at retailers are the classic real-time case: steady traffic, milliseconds per call, auto scaling for the evening peak, a canary for every new model version.
  • Nightly risk and propensity scoring at banks and insurers is Batch Transform: every account scored overnight, results in S3 for the morning's campaigns, no endpoint paid for during the day.
  • Video and medical image analysis where one request is hundreds of megabytes and takes minutes is Asynchronous Inference, with an SNS message when the result lands.
  • Software vendors with one model per tenant use multi-model endpoints so a thousand small models share a handful of instances.
Watch out

Serverless Inference is not free of limits: cold starts of seconds when a large model loads, a payload cap and a per-request time cap, and no GPU. A scenario with a large deep learning model and strict latency wants a real-time endpoint on the right instance (found with Inference Recommender), not serverless. And "asynchronous" in SageMaker means the queued endpoint, not batch; batch is a job with no endpoint.

Exam angle

The deployment table is the most-asked thing in this article. Who waits, how big, how steady: instant plus steady is real-time, intermittent is serverless, large or long with a notification is asynchronous, whole dataset with no urgency is Batch Transform. "Many models, one endpoint" is a multi-model endpoint. "Test a new model on live traffic without affecting users" is a shadow variant; "split traffic between two versions" is production variants for A/B testing. "Which instance type" is Inference Recommender. "Run on a device" is Neo to compile and Greengrass to run.

Endpoint
A hosted HTTPS URL with a model behind it. Real-time and serverless endpoints answer in the response; an asynchronous endpoint answers through S3.
Production variant
One model version behind an endpoint, with a share of the traffic; several variants make an A/B test.
Shadow test
Sending a copy of live requests to a new model whose answers are recorded but not returned, so it is judged on real traffic with no user impact.
Canary
Shifting a small slice of traffic to the new version first and watching alarms before moving the rest.

Monitoring: Model Monitor, the four kinds of drift, Clarify, Model Cards and the Model Dashboard

A deployed model decays because the world it was trained on changes, and monitoring is the stage that notices the decay and starts the retraining that fixes it.

Two kinds of change hurt. Data drift (feature drift, covariate shift) is the inputs changing: customers get younger, prices rise, a new product category appears, a sensor is recalibrated, a field starts arriving empty. Concept drift is the relationship between inputs and the right answer changing: the same transaction pattern that was fraud last year is now normal, or fraudsters have moved on to a pattern the model never saw. The first is visible from the inputs alone; the second only when the true labels arrive and the predictions are compared with them.

Amazon SageMaker Model Monitor automates the watching. First data capture is switched on for the endpoint (or the batch transform job), so requests and responses are copied to S3. A baseline job then runs over the training data to produce statistics (distributions, means, ranges) and constraints (the rules the live data should obey: this column is never null, this one is a number between 0 and 1). A monitoring schedule (hourly at the finest) runs a Processing job that compares the captured traffic against the baseline, writes a violations report to S3 and publishes metrics to CloudWatch, where an alarm can notify a team or trigger a retraining pipeline. Four monitor types cover the four things that can drift.

MonitorWatchesNeedsCatchesExam keyword
Data qualityStatistics of the live inputs against the training baselineCaptured requests onlyData drift: schema changes, nulls, out-of-range values, shifted distributions"input data has changed", "distribution of features"
Model qualityAccuracy, precision, recall, RMSE of live predictions against true labelsGround truth labels uploaded and merged with captured predictionsConcept drift: the model is getting things wrong"predictions are less accurate", "compare with actual outcomes"
Bias driftClarify's bias metrics on live predictions across groupsCaptured data with the sensitive attribute, optionally labelsA model that was fair at launch becoming unfair as the population shifts"fairness over time", "disparate impact in production"
Feature attribution driftSHAP feature importance ranking on live data against the baseline rankingCaptured data, a Clarify explainability baselineThe model relying on different features than it did when validated"feature importance has changed", "explainability drift"
sequenceDiagram
  autonumber
  participant E as Endpoint
  participant M as Model Monitor
  participant C as CloudWatch
  participant P as Retrain pipeline
  E->>E: data capture copies requests to S3
  M->>M: baseline from training data
  M->>E: hourly schedule reads captured data
  M->>M: compare with baseline constraints
  M->>C: metrics and violations report
  C->>C: alarm on drift threshold
  C->>P: EventBridge starts the pipeline
  P->>P: fresh data, train, evaluate, register
  P->>E: approved model deployed, canary first
Figure 7. Drift detection to retraining. The endpoint captures traffic, Model Monitor compares it with the training baseline on a schedule, CloudWatch alarms on violations, and an EventBridge rule starts the pipeline that trains and redeploys.

Clarify, Model Cards, the Model Dashboard

Amazon SageMaker Clarify is the bias and explainability tool that Model Monitor borrows for its last two monitors, and it works at every stage: pre-training bias metrics on the dataset (class imbalance, difference in proportions of labels), post-training bias metrics on predictions (disparate impact, accuracy and recall differences across groups), SHAP explanations of which features drove each prediction and the model overall, and evaluations of foundation models. The metrics and their meaning are in the responsible AI article; here the point is where Clarify sits in the lifecycle: evaluation before deployment, and drift after it. Amazon SageMaker Model Cards are the documentation record for a model: intended use, out-of-scope uses, risk rating, training data and method, evaluation results, observations and approval status, kept with the model so an auditor or a new team member can read it; the responsible AI article covers them alongside AI Service Cards. The Amazon SageMaker Model Dashboard is the single console view of every model in the account: which are deployed, which monitors run on them, which alarms are firing, and their lineage back to training jobs and data, so a fleet of endpoints can be checked from one page.

In the wild
  • Fraud teams live with concept drift as a job description: attackers change tactics within weeks, so model quality monitors on confirmed fraud labels feed a monthly or faster retrain.
  • Demand forecasting sees data drift every season and saw an extreme case in 2020, when shopping behaviour changed so fast that models trained on the previous year were wrong everywhere at once.
  • Content moderation and sentiment models drift as slang and events change the meaning of words; the text distribution shifts under the model.
Watch out

Model quality monitoring needs the true labels, and in most systems those arrive late: a fraud is confirmed weeks after the transaction, a churn happens at the end of the contract. Data quality monitoring is therefore the early warning, model quality the confirmation. A team with only data quality monitoring can miss pure concept drift, where the inputs look the same and the answers have changed.

Exam angle

"Detect drift", "data distribution has changed" or "model accuracy is degrading in production" is Model Monitor, and the follow-up asks which of its four monitors: input statistics is data quality, comparison with actual outcomes is model quality, fairness over time is bias drift, feature importance changes is feature attribution drift. "Explain a prediction" or "detect bias" is Clarify. "Document a model's intended use and risk" is Model Cards. "One view of all models and their monitoring alerts" is the Model Dashboard.

Data drift
The distribution of the model's inputs changing over time, so live data no longer looks like the training data.
Concept drift
The relationship between inputs and the correct output changing, so the same input now deserves a different answer.
Baseline
In Model Monitor, the statistics and constraints computed from training data that live traffic is compared against.
SHAP
A method that attributes each prediction to the features that drove it, giving per-prediction and overall feature importance.

MLOps: Pipelines, the Model Registry and CI/CD for models

MLOps is applying the discipline of software delivery to machine learning, so that every stage above runs as repeatable, versioned, automated code rather than as a notebook someone ran once, and SageMaker Pipelines with the Model Registry is the AWS implementation.

The principles

The exam names the ideas that MLOps is built from. Experimentation: many runs, tracked, comparable, cheap to repeat (SageMaker Experiments). Repeatable processes: the path from raw data to deployed model is code that produces the same model from the same inputs, not a sequence of manual clicks (Pipelines). Scalable systems: training, processing and serving run on managed infrastructure that grows with the data and the traffic rather than on one person's machine (training jobs, Processing jobs, endpoints with auto scaling). Managing technical debt: ML systems accumulate hidden debt fast (glue code, undeclared consumers of a model's output, feature pipelines nobody owns, data dependencies that silently change), and the remedies are the same as in software (versioning data and models, tests on data and on predictions, documented ownership, retiring what is unused). Achieving production readiness: a model is ready when it has passed evaluation gates, has monitoring, has a rollback path, has documentation, and is approved by someone accountable (Model Registry approval, Model Cards, deployment guardrails). Model monitoring and model re-training: production is a loop, and the loop is automated so that drift triggers retraining without a person noticing first.

SageMaker Pipelines and the Model Registry

Amazon SageMaker Pipelines is the workflow service built for ML: a pipeline is a directed graph of steps (Processing, Training, Tuning, Condition, RegisterModel, Transform, Lambda, Callback and more) defined in Python, parameterised (which dataset, which instance type), versioned, and visualised in Studio with the lineage of every artefact. A typical pipeline processes the data, trains, evaluates in a Processing job, and hits a condition step: if the objective metric beats the threshold (or the current production model), register the model; otherwise stop. Amazon SageMaker Model Registry is where registered models live: a model package group per problem, a numbered version per registered model, metadata (metrics, lineage, Model Card), and an approval status of pending, approved or rejected. A human, or an automated check, flips a version to approved, and that status change is an event.

CI/CD for models

Continuous integration and delivery for ML has two pipelines. The build pipeline runs when code or data changes: a commit to the model repository (GitHub, Bitbucket, or the now-closed-to-new-customers AWS CodeCommit) triggers AWS CodePipeline, which uses AWS CodeBuild to run the SageMaker Pipeline that processes, trains, evaluates and registers. The deploy pipeline runs when a model version is approved: the Model Registry emits an Amazon EventBridge event, CodePipeline picks it up, CodeBuild creates or updates the endpoint (typically through CloudFormation) in a staging account, tests it, waits for a manual approval, and promotes it to production with a canary. Amazon SageMaker Projects ships this whole arrangement as templates (build, train, deploy, with model monitoring included), so a team starts from working CI/CD rather than assembling it. Monitoring closes the loop: a Model Monitor alarm can start the build pipeline again with fresh data, which is model re-training on a trigger rather than on a calendar.

flowchart TD
  SRC["Code or data change<br/>commit, schedule, or drift alarm"] --> CP1["CodePipeline build stage<br/>CodeBuild runs the SageMaker Pipeline"]
  CP1 --> PL["SageMaker Pipeline<br/>process, train, evaluate, condition"]
  PL --> REG["Model Registry<br/>new version, pending approval"]
  REG --> APR{"Approved?"}
  APR -- "no" --> STOP["Rejected<br/>lineage kept, nothing deployed"]
  APR -- "yes, EventBridge event" --> CP2["CodePipeline deploy stage<br/>staging, tests, manual gate, production"]
  CP2 --> EP["Endpoint<br/>canary, then full traffic"]
  EP --> MON["Model Monitor and CloudWatch<br/>drift alarms"]
  MON -. "retrain trigger" .-> SRC
Figure 8. The MLOps loop on AWS. A change starts the build pipeline, the SageMaker Pipeline produces a registered model, approval fires the deploy pipeline, and the monitored endpoint feeds drift alarms back to the start.
MLOps conceptMeaningSageMaker and AWS feature
ExperimentationMany tracked, comparable runsExperiments, Studio notebooks
Repeatable processesData to model as versioned codePipelines, Processing jobs, Data Wrangler exports
Scalable systemsManaged compute that grows with loadTraining jobs, distributed training, endpoints with auto scaling
Managing technical debtVersioned data, models, features; tests; ownershipModel Registry, Feature Store, lineage tracking, Model Cards
Production readinessGates, approval, rollback, documentationCondition steps, Registry approval, deployment guardrails, Model Cards
Model monitoringWatch data and predictions for driftModel Monitor, Clarify, CloudWatch, Model Dashboard
Model re-trainingRetrain on a schedule or on driftPipelines started by EventBridge from an alarm or a schedule
CI/CDAutomated build, test and deploy of modelsSageMaker Projects, CodePipeline, CodeBuild, EventBridge, CloudFormation
In the wild
  • Netflix retrains and redeploys recommendation models continuously through its Metaflow and internal workflow tooling, with A/B tests as the approval gate.
  • Uber's Michelangelo was one of the first published end-to-end MLOps platforms: feature store, training, registry, deployment and monitoring under one roof, which is the shape SageMaker Projects templates reproduce.
  • Amazon.com retrains thousands of forecasting and ranking models on schedules and on triggers; a model left untrained for a season is treated as a bug.
Watch out

Automating retraining without automating evaluation is how a bad model reaches production at three in the morning. The condition step that compares the new model with the current one, and the approval status in the Registry, are the safety catches; a pipeline that registers and deploys unconditionally has removed them. Retraining also reproduces whatever bias is in the fresh data, which is why bias drift is one of the monitors.

Exam angle

"Orchestrate the ML workflow", "automate the steps from data to model" or "repeatable pipeline" is SageMaker Pipelines. "Version models and manage approval for deployment" is the Model Registry. "CI/CD templates for ML" is SageMaker Projects, built on CodePipeline and CodeBuild. "Automatically retrain when drift is detected" is Model Monitor to CloudWatch to EventBridge to Pipelines. The MLOps principles appear as definitions: repeatable processes, scalable systems, technical debt, production readiness, monitoring, re-training.

MLOps
The practices and tooling that make training, deploying and maintaining models automated, repeatable and monitored, borrowing from DevOps.
Lineage
The recorded chain from a deployed model back through the training job, hyperparameters, code and data that produced it.
Approval status
The Model Registry flag (pending, approved, rejected) on a model version that gates deployment and fires an event when changed.
Condition step
A Pipelines step that branches on a metric, so only a model that beats the bar is registered.

Recap

  • The lifecycle is ten stages in a loop: business goal, data collection, exploratory analysis, pre-processing, feature engineering, training, tuning, evaluation, deployment, monitoring; monitoring feeds collection again.
  • SageMaker has a feature per stage: Ground Truth labels, Data Wrangler explores and prepares, Processing jobs run scripts at scale, Feature Store keeps features consistent (online for inference, offline in S3 for training), training jobs train, Automatic Model Tuning tunes, endpoints and Batch Transform serve, Model Monitor watches, Pipelines orchestrate.
  • Ground Truth offers Mechanical Turk, vendor and private workforces plus active-learning automated labelling; Ground Truth Plus is the fully managed version; A2I is human review of live predictions.
  • Models come from custom training (built-in algorithm, script mode, own container), JumpStart (pre-trained models and solution templates, fine-tune or deploy in clicks), Hugging Face containers, or open-source weights packaged onto an endpoint.
  • Built-ins to know by keyword: XGBoost for tabular, Linear Learner, K-Means, PCA, Random Cut Forest for anomalies, DeepAR for forecasting, BlazingText for text, plus the vision algorithms.
  • Automatic Model Tuning strategies are grid, random, Bayesian (the efficient default) and Hyperband; Autopilot automates the whole model build with a transparent leaderboard; Canvas is the no-code front for analysts; Debugger catches training faults; Experiments tracks runs.
  • Classification metrics are ratios of TP, FP, FN, TN: accuracy misleads on imbalanced data, precision when false positives cost, recall when false negatives cost, F1 to balance both, AUC-ROC across all thresholds, log loss for probability quality.
  • Regression metrics: MAE in target units and robust, MSE and RMSE punishing big misses, MAPE as a percentage that breaks near zero, R squared as variance explained.
  • Business metrics are a separate family: ROI, development costs, cost per user, customer feedback, time to market, revenue lift, judged by A/B test on the business number.
  • Serving: real-time for instant and steady, serverless for intermittent, asynchronous for large or slow with an S3 result, Batch Transform for whole datasets with no endpoint; multi-model endpoints share instances; production and shadow variants test safely; Inference Recommender sizes; Neo compiles for the edge.
  • Model Monitor has four monitors: data quality, model quality (needs labels), bias drift and feature attribution drift (both through Clarify); results go to S3 and CloudWatch; Model Cards document, the Model Dashboard oversees.
  • MLOps means experimentation, repeatable processes, scalable systems, managed technical debt, production readiness, monitoring and re-training; on AWS that is Pipelines plus Model Registry approval, CodePipeline and CodeBuild through SageMaker Projects, and EventBridge closing the loop from drift to retrain.

Questions

Try answering each one out loud before opening it. Lead with the one-line answer, then the reasoning, then one detail that shows you have used it.

Walk through the stages of the machine learning lifecycle and name the SageMaker feature for each.

Business goal, data collection, exploratory data analysis, pre-processing, feature engineering, training, hyperparameter tuning, evaluation, deployment and monitoring, in a loop where monitoring sends you back to collection.

  • Collection and labelling: S3 plus Ground Truth. Exploration and pre-processing: Data Wrangler and Processing jobs. Features: Feature Store.
  • Training: training jobs with built-in algorithms or your own code; tuning: Automatic Model Tuning; evaluation: Processing jobs, Clarify, Experiments.
  • Deployment: real-time, serverless or asynchronous endpoints, or Batch Transform; monitoring: Model Monitor with CloudWatch; orchestration: Pipelines.

The first five stages usually take most of the calendar time; training is often the shortest, which surprises people planning their first project.

A company has a million unlabelled product images and confidential customer photos it must classify. How should it label them?

SageMaker Ground Truth: the product images with a Mechanical Turk workforce and automated data labelling to cut cost, the confidential photos with a private workforce of the company's own staff.

  • Ground Truth's three workforces are Mechanical Turk (public, cheap), vendors from AWS Marketplace (contracted specialists) and private (your own people, for sensitive data).
  • Automated labelling trains a model on the human labels as they arrive and labels the confident items itself, an active-learning loop that reduces the human share on large sets.
  • If the company wants no workforce or workflow to manage at all, Ground Truth Plus supplies AWS-managed experts.

Consensus labelling, sending each item to several people and keeping the majority, is how label quality is controlled, and disagreement rates show where the labelling guide is unclear.

What problem does SageMaker Feature Store solve, and what is the difference between its online and offline stores?

It gives features one definition that is computed once and served both to training and to inference, removing training-serving skew, and it lets teams share features instead of recomputing them.

  • The online store holds the latest value per record and is read by endpoints at inference in milliseconds by key.
  • The offline store holds the full history in S3 as Parquet, catalogued in Glue and queried with Athena or Spark, to build training sets.
  • Point-in-time queries rebuild a training row with only the feature values that existed at its event time, so no future information leaks in.

Uber's Michelangelo introduced the pattern because dispatch models trained on one version of "rides in this area in the last hour" and served with another, and the mismatch was invisible until production.

A team wants to use a pre-trained open-source foundation model but the weights must stay inside its own AWS account. What is the fastest route?

SageMaker JumpStart: pick the model from the hub and deploy it to an endpoint in the team's account, fine-tuning it first on their data if needed, all with a few clicks or SDK lines.

  • JumpStart holds hundreds of pre-trained models, including foundation models such as Llama, Falcon and Mistral, plus solution templates for whole use cases.
  • Amazon Bedrock would be less effort still, but the model runs in AWS's service, not on instances in the customer's account; the "weights stay with us" constraint is what selects JumpStart.
  • Models from the Hugging Face Hub can equally be pulled into a SageMaker endpoint through the Hugging Face Deep Learning Containers.

The trade-off is cost shape: a JumpStart endpoint bills for GPU instances every hour it is up, so it pays off at high utilisation and loses to Bedrock for sporadic use.

What is a SageMaker training job, and how does Managed Spot Training reduce its cost?

A training job is a managed run of an algorithm container on instances SageMaker provisions, reading data from S3, writing a model artefact back to S3 and stopping, so you pay only for the training time.

  • Inputs: the container (built-in, framework or your own), S3 data locations, instance type and count, hyperparameters; outputs: model.tar.gz in S3 and metrics and logs in CloudWatch.
  • Managed Spot Training runs the job on spare capacity at a steep discount, with the risk of interruption.
  • The script writes checkpoints to S3 so an interrupted job resumes from the last checkpoint instead of restarting.

Pipe and FastFile input modes stream data from S3 instead of copying it first, which shortens the start of jobs on large datasets.

Name four SageMaker built-in algorithms and the problem each is for.

XGBoost for tabular classification and regression, DeepAR for time-series forecasting, Random Cut Forest for anomaly detection and BlazingText for word embeddings and text classification.

  • Others by keyword: Linear Learner for linear and logistic regression, K-Means for clustering, PCA for dimensionality reduction, Factorization Machines for sparse click data.
  • Vision: Image Classification, Object Detection, Semantic Segmentation; text: Sequence-to-Sequence, Neural Topic Model, LDA; IP Insights for unusual account and address pairs.
  • A built-in needs only data in the expected format and hyperparameters; no training code.

DeepAR trains one model across all the related series rather than one per series, which is why it can forecast a new product with almost no history of its own.

How does Automatic Model Tuning work, and how do grid, random and Bayesian search differ?

It runs many training jobs with different hyperparameter values inside the ranges you give and keeps the best by a named objective metric on validation data.

  • Grid search tries every combination of listed values, exhaustive but combinatorial; in SageMaker it is limited to categorical parameters.
  • Random search samples the ranges at random, simple and parallel but wasteful.
  • Bayesian optimisation models how settings map to scores and picks the next most promising point, reaching a good answer in the fewest jobs; it is the default. Hyperband stops poor jobs early and reallocates the budget.

Early stopping and warm start from a previous tuning job are the two ways to keep the bill down, since tuning is training multiplied.

A business analyst with no coding skills wants to build a churn prediction model from a spreadsheet. Which SageMaker feature, and what runs underneath it?

SageMaker Canvas, the no-code visual application, with Autopilot doing the automated model building underneath.

  • Canvas connects to the data, prepares it (Data Wrangler now lives inside Canvas), builds and explains the model, and can share it into Studio for deployment.
  • Autopilot handles pre-processing, algorithm selection, training and tuning, and produces a leaderboard of candidates plus notebooks that show what it did.
  • Automatic Model Tuning alone would be the wrong answer: it tunes a chosen algorithm and needs a data scientist to set it up.

Canvas also gives point-and-click access to ready-to-use models such as sentiment and document extraction and to foundation models, so not every Canvas task ends in training.

Define precision and recall from the confusion matrix, and say which to optimise for a fraud detector and which for a spam filter.

Precision is TP over (TP + FP), the share of flagged items that were really positive; recall is TP over (TP + FN), the share of real positives that were caught; fraud wants recall, spam wants precision.

  • A missed fraud (false negative) is a direct loss, while a false alarm is a quick "was this you?" check, so the fraud threshold is set low to catch more.
  • A legitimate email in the spam folder (false positive) is worse than one spam message in the inbox, so the spam threshold is set high to flag less.
  • The two move against each other as the decision threshold moves; F1, their harmonic mean, summarises both when neither error dominates.

In practice fraud systems run two stages: a high-recall model raises alerts and a stricter model or a person decides which alerts to act on.

Why is accuracy a poor metric for an imbalanced dataset, and what does AUC-ROC add?

On imbalanced data a model that always predicts the majority class scores a high accuracy while detecting nothing; AUC-ROC measures how well the model ranks positives above negatives across every threshold, so it cannot be fooled that way.

  • With one fraud in a thousand, "always honest" is 99.9 percent accurate and useless; precision, recall and F1 expose it.
  • The ROC curve plots true positive rate against false positive rate as the threshold slides; the area under it is 1.0 for a perfect ranker and 0.5 for a coin toss.
  • AUC compares models before a threshold is chosen; precision and recall judge the model at the threshold you will actually deploy.

Log loss is the third view: it scores the probabilities themselves, punishing a confident wrong answer far more than a hesitant one, which is why it is the training loss of most classifiers.

Compare MAE, RMSE, MAPE and R squared for a demand forecasting model.

MAE is the average miss in units, RMSE is the same but punishes large misses more, MAPE is the average miss as a percentage of the actual, and R squared is the share of the target's variance the model explains.

  • MAE and RMSE are in the target's units; RMSE is always at least MAE, and a big gap means a few large errors.
  • MAPE compares forecasts across products of different scale but explodes when actual demand is near zero, so intermittent items need a weighted variant.
  • R squared runs from 1 (perfect) through 0 (no better than the mean) to negative, and says nothing about error size in real units.

MSE, the squared version of RMSE, is what most regressors minimise during training because it is smooth; RMSE is what gets reported because its units make sense.

What is the difference between model performance metrics and business metrics, and how are they connected?

Model metrics (accuracy, F1, RMSE) say how well the model predicts; business metrics (return on investment, cost per user, development costs, customer feedback, time to market, revenue lift) say whether the project paid off; the model metric is chosen in stage one as a stand-in for the business one.

  • ROI is value created minus cost over cost; development costs and cost per prediction are its inputs; customer feedback catches failures no metric measured.
  • Revenue or conversion lift is established by an A/B test comparing the business number, not the F1, between users with and without the model.
  • A recall gain becomes a business result only when translated into losses prevented against the cost of extra false alarms.

Netflix has said publicly that offline ranking improvements often fail to move retention in A/B tests, which is why the business metric is the final judge.

A model receives requests of several hundred megabytes that take minutes to process, and the caller only needs a notification when the result is ready. Which SageMaker deployment option?

Asynchronous Inference: requests are queued, processed and written to S3, with an SNS notification, and it accepts payloads up to about a gigabyte and processing up to about an hour.

  • A real-time endpoint is limited to small payloads and about a minute per call; Serverless Inference has a smaller payload cap, the same time cap and cold starts.
  • Batch Transform would fit if the inputs were a whole dataset to score at once with no endpoint, but here requests arrive one at a time.
  • Asynchronous endpoints scale their instances to zero when the queue is empty, so idle periods cost nothing.

The mental test is three questions: is anyone waiting, how big and slow is each request, how steady is the traffic; large and slow with a notification lands on asynchronous every time.

When would you choose Serverless Inference over a real-time endpoint, and what are its limits?

When traffic is intermittent or unpredictable with idle periods, because serverless scales to zero and bills per request and per millisecond of compute, while a real-time endpoint bills for its instances whether or not anyone calls.

  • Limits: a cold start of seconds when the model loads after idleness, a payload cap of a few megabytes, a per-request time cap of about a minute, memory chosen from fixed sizes, and no GPU.
  • Steady, latency-sensitive traffic or a large deep learning model that needs an accelerator wants a real-time endpoint on an instance type found with Inference Recommender.
  • Multi-model endpoints are the other cost lever for many small models, sharing instances and loading models on demand.

Provisioned concurrency on serverless endpoints keeps a number of instances warm to remove cold starts for the traffic you can predict, at a standing cost.

What are the four monitor types in SageMaker Model Monitor, and which one needs ground truth labels?

Data quality, model quality, bias drift and feature attribution drift; model quality is the one that needs the true labels, because it compares live predictions with actual outcomes.

  • Data quality compares live input statistics with a baseline from the training data and catches data drift: nulls, out-of-range values, shifted distributions.
  • Bias drift and feature attribution drift use Clarify: fairness metrics across groups over time, and SHAP feature importance compared with the baseline ranking.
  • All four run on a schedule over captured traffic, write violation reports to S3 and metrics to CloudWatch, where alarms can trigger retraining.

Because labels arrive late (a fraud is confirmed weeks later), data quality is the early warning and model quality the confirmation; a team with only data quality monitoring can miss pure concept drift.

Explain the difference between data drift and concept drift with an example of each.

Data drift is the inputs changing (the customers are younger, prices are higher, a field is now empty); concept drift is the relationship between inputs and the right answer changing (the same transaction pattern that meant fraud last year is now normal).

  • Data drift is visible from the inputs alone, so a data quality monitor catches it without labels.
  • Concept drift shows only when predictions are compared with true outcomes, so it needs model quality monitoring with labels.
  • Both are fixed the same way: fresh data, retrain, evaluate, redeploy, ideally triggered automatically.

The 2020 shift in shopping behaviour was both at once and broke demand forecasts everywhere, which is the example teams now use to justify monitoring budgets.

A team retrains models by hand from notebooks and wants repeatable, automated CI/CD for them on AWS. What should it use?

SageMaker Pipelines to define the data-to-registered-model workflow as code, the Model Registry to version models and gate deployment on approval, and SageMaker Projects templates that wire CodePipeline and CodeBuild around them, with EventBridge starting the deploy pipeline when a model is approved.

  • A pipeline is a graph of Processing, Training, Tuning, Condition and RegisterModel steps; the condition step registers a model only if it beats the metric bar.
  • The Registry holds model package groups with numbered versions and pending, approved or rejected status; approval emits an EventBridge event.
  • CodePipeline with CodeBuild deploys the approved version to staging, tests, waits for a manual gate and promotes to production with a canary; a Model Monitor alarm can restart the build pipeline for retraining.

The MLOps principles this delivers by name are repeatable processes, scalable systems, managed technical debt, production readiness, monitoring and re-training, with Experiments covering experimentation.