Based on the MLA-C01 exam guideReport an error
Yesterday we tied together data and models. Today we organize the second-half domains that operate those models.
[Domain 3 — Deployment & Orchestration 22%]
Model Registry ──▶ Create model ──▶ Endpoint config ──▶ Deploy
(versions, approval) Model EndpointConfig ├ Real-time (sync, always on)
(variants, weights) ├ Serverless (sync, scale to 0)
├ Asynchronous (queue, large payloads)
Orchestration └ Batch transform (bulk, per job)
EventBridge ─▶ SageMaker Pipelines(DAG) ─▶ ConditionStep ─▶ Registry ─▶ Deploy
Processing→Training→Eval (stop if below the criterion)
[Domain 4 — Monitoring & Security 24%]
Operational monitoring Three pillars of security
────────── ──────────
Data capture → Model Monitor IAM : least-privilege execution role
├ Data Quality (input distribution) VPC : subnets + VPC endpoints + network isolation
├ Model Quality (vs. truth, needs labels) KMS : encryption at rest (S3, EBS, artifacts), TLS in transit
├ Bias Drift (Clarify integration)
└ Feature Attribution Drift (Clarify) Governance
│ CloudTrail (who called which API) · CloudWatch (metrics, logs)
▼ Model Cards (documentation) · Lineage (provenance)
CloudWatch alarm → SNS → retraining triggerChoose among the 4 inference options not by algorithm but by request pattern.
| Option | Response | Traffic | Payload/time | Always-on cost |
|---|---|---|---|---|
| Real-time | Sync, ms to seconds | Steady | <6MB, <60 s | Yes (at least 1 instance) |
| Serverless | Sync, ms to seconds | Intermittent | <4MB, <60 s | None (scales to 0) |
| Asynchronous | Queue-based | Variable, long processing | <1GB, <60 min | None (scales to 0) |
| Batch transform | Per job | Bulk | Entire dataset | None (ends when finished) |
[Inference option decision tree]
Is a response needed right now?
│
├─ No ─▶ Is the request "the entire dataset at once"?
│ ├─ Yes ─▶ Batch transform
│ └─ No (individual requests that take long/are large) ─▶ Asynchronous inference
│
└─ Yes ─▶ Is traffic steady?
├─ Yes ─▶ Real-time endpoint (at least 1 instance always on, cannot scale to 0)
└─ No (intermittent, long idle periods) ─▶ Is a cold start acceptable?
├─ Yes ─▶ Serverless inference
└─ No ─▶ Real-time + auto scalingThe decision axes are "immediacy, traffic, payload, cost." Immediate response + steady traffic means real-time; immediate response but intermittent with cold starts acceptable means serverless; large payloads, long processing, individual requests means asynchronous; bulk over an entire dataset means batch. When cost is the concern, use MME for many same-type models, Inferentia for deep-learning inference, and scale-to-0 options when there is a lot of idle time.
Even for the same "real-time endpoint," what you load into it differs.
| Form | What it is | When to pick it |
|---|---|---|
| Multi-model endpoint (MME) | Dynamically loads many models from S3 into one container | There are very many models of the same framework, each invoked rarely |
| Multi-container endpoint (MCE) | Places a few different containers on one endpoint | A few models with different frameworks on one endpoint |
| Inference pipeline | Chains preprocessing → model → postprocessing containers sequentially | Apply the same preprocessing used in training to inference too (prevents skew) |
| Production variant | Distributes traffic across multiple models on one endpoint by weight | A/B testing, gradual traffic shifting |
⚠️ Trap: MME and MCE appear side by side in the options. The one phrase that separates them is "how many models, and do they share a framework." Hundreds to thousands of same-type models means MME; a few models with different frameworks means MCE. And "apply the training-time preprocessing identically at inference" is not MME but an inference pipeline (or Feature Store).
[Zero-downtime deployment] New configuration ─▶ Traffic shift (canary/linear/all at once)
─▶ Watch CloudWatch alarms ─▶ Automatic rollback on anomaly| Cost-reduction requirement | Answer |
|---|---|
| Hundreds of same-type models | MME |
| Intermittent traffic with long idle time | Serverless (or asynchronous) |
| Deep-learning inference unit cost | AWS Inferentia (inf family) |
| Training cost (interruption tolerated) | Managed Spot Training + checkpoints |
| Nightly bulk scoring | Batch transform |
From here on, the story is about making deployment "repeatable" rather than "by hand every time." SageMaker Pipelines is an ML-specific CI/CD orchestrator that ties data processing → training → evaluation → registration → deployment into a DAG. It connects Steps and places gates such as "register if accuracy meets the criterion" with a condition step (ConditionStep). Model Registry manages model versions by catalog and approval status.
| MLOps requirement | Service |
|---|---|
| ML workflow DAG orchestration | SageMaker Pipelines |
| Model version/approval management | Model Registry |
| General-purpose workflow (serverless function chains) | Step Functions |
| Infrastructure as code | CloudFormation / CDK |
| Code commit → build → deploy CI/CD | CodePipeline + CodeBuild |
| Event-based trigger (retraining) | EventBridge |
| Compare experiment/trial records | SageMaker Experiments |
| Track data → training → model provenance | Lineage Tracking |
from sagemaker.workflow.condition_step import ConditionStep
from sagemaker.workflow.conditions import ConditionGreaterThanOrEqualTo
# A gate that moves on to the model registration step only when the evaluation metric meets the criterion
cond = ConditionGreaterThanOrEqualTo(left=accuracy_metric, right=0.85)
gate = ConditionStep(
name='AccuracyGate',
conditions=[cond],
if_steps=[register_step], # Pass: register in the Model Registry
else_steps=[], # Fail: do nothing and finish
)Pipelines and Step Functions are easy to confuse. Pipelines is specialized for SageMaker steps, expresses ML workflows most naturally, and integrates with lineage and the Registry. Step Functions is more general-purpose and suits cases where many non-ML steps that weave together various AWS services such as Lambda and Glue are mixed in. For "automatically trigger retraining when new data arrives," the correct answer is the pattern where EventBridge starts the Pipeline.
After deployment, a model quietly gets worse as the data/world changes. SageMaker Model Monitor watches four types.
| Monitor type | What it watches | Real ground truth needed? |
|---|---|---|
| Data Quality | Changes in input data statistics/schema (covariate drift) | Not needed |
| Model Quality | Prediction performance degradation against real ground truth | Needed |
| Bias Drift | Bias change in production (Clarify integration) | Needed depending on the bias metric |
| Feature Attribution Drift | Change in feature attribution (Clarify integration) | Not needed |
It works by creating a baseline (statistics at training time) → periodically comparing production data → sending a CloudWatch alert on violations.
[How Model Monitor works]
Training data ──▶ Baseline job ──▶ Save statistics and constraints (S3)
│
Endpoint ──▶ Data capture (store requests/responses in S3) │
│ ▼
└──▶ Periodic monitoring job ──▶ Violation report
▼
CloudWatch metrics/alarm ─▶ SNS ─▶ Retraining⚠️ Trap: "Drift detection" is almost always Model Monitor. If the input distribution changes it's Data Quality; if performance against ground truth drops it's Model Quality. But Model Quality needs the actual ground truth, so in environments where ground truth arrives late, a label collection pipeline is needed as well. Changes in bias and feature attribution are the Bias/Attribution Drift monitors integrated with Clarify. Also, the prerequisite for monitoring is enabling data capture — without capture turned on, there is no source data to watch.
The three pillars of ML security are permissions (IAM), isolation (VPC), and encryption (KMS).
EnableNetworkIsolation blocks the container's outbound communication.[Permission and network path]
User/service ──(IAM policy, trust relationship)──▶ SageMaker execution role
│ access only through this role
▼
VPC (private subnet) ── training/endpoint container
│ EnableNetworkIsolation = block the container's outbound internet communication
├─ Gateway endpoint ──▶ S3
└─ Interface endpoint (PrivateLink) ──▶ ECR, SageMaker API/Runtime, etc.
▼
Objects are stored encrypted with a KMS key| Endpoint type | Connection method | Main targets |
|---|---|---|
| Gateway endpoint | Adds a route to the route table | S3, DynamoDB |
| Interface endpoint (PrivateLink) | Creates an ENI in the subnet, accessed via a private IP | Most AWS services (ECR, SageMaker API, etc.) |
Security scenarios reduce to three questions. "Who can do what" (IAM), "where does it communicate" (VPC/endpoints/isolation), "is the data protected" (KMS at rest + TLS in transit). "Process sensitive data without internet exposure" is VPC + VPC endpoints + network isolation, "encryption of data at rest for regulatory compliance" is KMS, and "a notebook has excessive permissions" is IAM least privilege.
Operational tracking and auditing tools are tested too. CloudTrail is the API call audit log, CloudWatch is metrics, logs, and alarms, SageMaker Model Cards is model documentation and governance, and Lineage Tracking tracks data → training → model provenance.
| Question form | Answer |
|---|---|
| "Who deleted this resource and when" | CloudTrail |
| "Alert when latency/error rate exceeds a threshold" | CloudWatch alarm |
| "What data did this model come from" | Lineage Tracking |
| "Document the model's purpose and limitations" | Model Cards |
| "Compare metrics across training attempts" | SageMaker Experiments |
Auditing such as "who deleted the endpoint" is CloudTrail (API records), while "monitoring and alarming on endpoint latency and error rate" is CloudWatch. Their roles differ — CloudTrail is "who did what (governance)," CloudWatch is "how the system is behaving (operational metrics)." Tracking a model's origin and reproducibility is Lineage, and documenting a model's intent, performance, and limitations is Model Cards.
| Confusing pair | The one phrase that separates them |
|---|---|
| Asynchronous inference vs. batch transform | Individual requests via a queue / the entire dataset as a job |
| Serverless vs. asynchronous | Small payload, short processing / large payload, long processing |
| MME vs. MCE | Same framework, many models / different frameworks, few models |
| Data Quality vs. Model Quality | Input distribution change / performance vs. ground truth (labels required) |
| Model Monitor vs. Clarify | Continuous monitoring in production / one-off bias and explanation analysis |
| Pipelines vs. Step Functions | SageMaker-specific ML CI/CD / general-purpose service orchestration |
| CloudTrail vs. CloudWatch | Who called which API / how the system is behaving |
| Production variant vs. inference pipeline | Traffic distribution (A/B) / sequential chain (preprocessing → model) |
| Symptom | Common cause | Action |
|---|---|---|
| Inference latency exceeds the requirement | Not enough instances / model is heavy / preprocessing is slow | Auto Scaling, scale up instances, slim down the model, consider Inferentia |
| Payload is large or processing exceeds 60 seconds and fails | Exceeded real-time/serverless limits | Asynchronous inference (large payloads, long processing) or batch transform |
| Costs keep running even during idle time | Real-time endpoint kept always on | Switch to serverless/asynchronous (real-time cannot scale to 0) |
| S3/ECR access is denied | Insufficient execution role permissions or missing KMS key permissions | Check IAM policy and KMS key policy, verify resource ARNs |
| Training inside the VPC can't reach S3 | VPC endpoint not configured, or routing/security group problem | Add a Gateway endpoint for S3 and Interface endpoints for services |
| Monitoring reports no violations at all | Data capture not enabled or baseline not created | Enable data capture + run the baseline job first |
| Model Quality is not calculated | Real ground truth not collected | Build a label collection path and join with predictions |
| Error rate spiked after deployment | New model regression | Canary/linear shifting + alarm-based automatic rollback |
Tomorrow we set our real-exam pace with 8 comprehensive scenario questions that mix the 4 domains.
Click a choice to reveal the answer and explanation.
Question 1
You want to automatically detect whether the input data distribution of a production classification endpoint drifts from training time over time (covariate drift) and receive an alert on violations. What is the most appropriate choice?
Question 2
Whenever new training data arrives in S3, you want to automatically run data processing → training → evaluation → (if the accuracy criterion is met) model registration. What is the most appropriate setup?
Question 3
In a regulated industry, a SageMaker training job processes sensitive data, and it must access S3 and ECR without going over the internet and block the container's external communication. What is the most appropriate setup?
Question 4
In a security audit, you must find out "who deleted the production endpoint last month." What is the most appropriate service?
Question 5
Which is the most accurate selection criterion between SageMaker Pipelines and AWS Step Functions?