CertNote/ Commute Study Notes
Roadmap
KOEN
CLF-C02 · FoundationalCloud Practitioner - Foundational
DVA-C02 · AssociateDeveloper - Associate
SAA-C03 · AssociateSolutions Architect - Associate
SOA-C02 · AssociateCloudOps Engineer - Associate
SAP-C02 · ProfessionalSolutions Architect - Professional
DOP-C02 · ProfessionalDevOps Engineer - Professional
Linux Master 2 · 2급KAIT Linux Master - Level 2
SCS-C03 · SpecialtySecurity - Specialty
Linux Master 1 · 1급KAIT Linux Master - Level 1
MLA-C01 · AssociateMachine Learning Engineer - Associate
  • Week 1
    • 1.The ML Lifecycle and the Role of the ML Engineer
    • 2.ML Problem Types and Evaluation Metric Basics
    • 3.AWS ML Stack at a Glance
    • 4.SageMaker Overview: Studio, Training/Inference, Built-in Algorithms
    • 5.Week 1 Comprehensive Review — ML Fundamentals & AWS Stack
  • Week 2
  • Week 3
  • Week 4
  • Week 5
  • Week 6
  • Week 7
  • Week 8
    • 1.SageMaker Model Monitor: Data Quality and Model Quality Drift
    • 2.Bias and Explainability Drift: Monitoring During Operations with Clarify
    • 3.Operational Monitoring: CloudWatch Metrics/Alarms, Endpoint Latency/Errors, Logging
    • 4.Retraining and Model Maintenance: Automated Retraining Pipelines and A/B and Shadow Testing
    • 5.Week 8 Summary: ML Solution Monitoring and Maintenance Review
  • Week 9
  • Week 10
AIF-C01 · FoundationalAI Practitioner - Foundational
DEA-C01 · AssociateData Engineer - Associate
MLS-C01 · SpecialtyMachine Learning - Specialty
SQLD · 개발자SQL Developer (SQLD)

© CertNote · 주간랩스

  • About
  • Changelog
  • Contact
  • Terms
  • Privacy
← MLA-C01/Week 8/Day 5

Based on the MLA-C01 exam guide·Report an error

MLA-C01· AssociateWeek 8 · Day 5~29 min read

Day 5 - Week 8 Summary: ML Solution Monitoring and Maintenance Review

📌 Key Takeaways

  • The backbone of Week 8 is a closed loop - detect (drift, performance, system) → alarm → retrain → safe redeploy → detect again.
  • Monitor selection splits on whether labels exist. Labels available → model quality; none → data quality and feature attribution.
  • Model performance degradation (accuracy) and system performance degradation (latency, errors) call for different tools - Model Quality Monitor vs CloudWatch.
  • Investigating an error-rate surge starts with the 4XX (client) / 5XX (server) split; pinpointing latency by segment is X-Ray.
  • Redeployment is a risk ladder - shadow (zero impact) → A/B and canary (small exposure) → Blue/Green (automatic rollback is essential).

Week 8 on One Page

Week 8 covered "life after deployment". The model begins creating value the moment it ships, but simultaneously begins to drift from the world. Data changes, bias emerges, the system slows down, performance drops. The four posts connect into one loop.

              ┌───────────────── Running endpoint ─────────────────┐
              │                                                     │
   ┌──────────┴──────────┐                 ┌────────────────────┐   │
   │ Day 1-2  Is the model right │          │ Day 3  Is the system healthy │   │
   │  Data quality (Deequ)    │             │  ModelLatency        │   │
   │  Model quality (needs GT) │            │  OverheadLatency     │   │
   │  Bias drift (Clarify)     │            │  4XX / 5XX Errors    │   │
   │  Attribution drift (SHAP) │            │  CPU/Mem/GPU utilization │   │
   └──────────┬──────────┘                 └──────────┬─────────┘   │
              │                                       │             │
              └───────────┬───────────────────────────┘             │
                          ▼                                         │
                 CloudWatch metrics · alarms                         │
                          │                                         │
        ┌─────────────────┴──────────────────┐                      │
        ▼                                    ▼                      │
  Auto Scaling / operational action     EventBridge · Lambda         │
  (respond to latency/errors)                │                       │
                                           ▼                         │
                              Day 4  SageMaker Pipelines retraining  │
                                     → ConditionStep → Registry      │
                                     → shadow / A/B / blue-green redeploy ──┘

1. The Four Model Monitor Monitors (Days 1-2)

All monitoring starts with Data Capture (storing requests and responses in S3), builds a baseline (the standard for normal), and then launches a Processing Job on a cron schedule to compare.

MonitorWhat it watchesToolLabels needed
Data qualityDistribution statistics of input features (data drift)Model Monitor (Deequ)Not needed
Model qualityPrediction performance metrics (accuracy, F1)Model MonitorNeeded (ground truth)
Bias driftPrediction bias between groups (fairness)ClarifyNot needed for some
Feature attribution driftChanges in feature importance (SHAP)ClarifyNot needed

Looking at the same table again as "when does it fire" makes the choice sharper.

MonitorDetection speedIncidents it catchesWhat it cannot catch
Data qualityImmediate (next period)Schema breakage, missing-value surge, new categories, distribution shiftThe case where the distribution is unchanged but the relationship changed
Model qualityAfter labels accumulateActual accuracy drop (the consequence of concept drift)Cannot be computed at all without labels
Bias driftImmediate; delayed for metrics that need labelsChanges that become unfavorable to a particular groupOverall performance degradation itself
Feature attribution driftImmediateThe features the model depends on changed (early warning)How much worse performance actually became

💡 Related theory: The key distinction of drift - data drift (covariate shift) is a change in the distribution of input X (the data quality monitor), and concept drift is a change in the relationship between X and Y (the model quality monitor captures it as performance degradation). If labels cannot be obtained immediately, model quality is impossible, so you work around it with data quality or feature attribution drift to get an early warning. This "label availability → monitor choice" logic is the criterion that decides the answer in Week 8 multiple-choice questions.

2. Operational Monitoring: CloudWatch and X-Ray (Day 3)

Separately from whether the model is right, we look at whether the system is healthy. The three pillars of observability: metrics (CloudWatch Metrics), logs (CloudWatch Logs), traces (X-Ray).

  • Key metrics: ModelLatency and OverheadLatency (latency), Invocations (call volume), 4XX/5XXErrors (errors), CPU/Memory/GPUUtilization (resources).
  • 4XX = client error (wrong input), 5XX = server error (container crash, resource shortage). The first step in error tracing.
  • CloudWatch Alarm: Fires SNS, Auto Scaling, or Lambda when a threshold is breached. EvaluationPeriods reduces false positives.
  • Responding to traffic swings is Application Auto Scaling, not a simple alarm.

For latency metrics, which one spiked determines the cause.

Observed combinationInterpretationNext action
Total latency ↑, ModelLatency normalThe bottleneck is outside the model (front-end Lambda, network, external API)Pinpoint the segment with X-Ray
ModelLatency ↑Model computation, instance loadUpgrade or add instances, slim down the model
OverheadLatency ↑Payload and request-handling overheadShrink payload, simplify format
5XXErrors ↑ + MemoryUtilization ↑Container OOM, resource shortageLarger-memory type, reduce batch size
4XXErrors ↑Caller input or authentication problemClient validation, document the schema
# Best practice for operations: gather operational metric alarms + model monitor metrics on one dashboard
# ModelLatency surge → instance load, OverheadLatency surge → request handling/payload problem
# Only total latency up while ModelLatency is normal → trace the front-end (Lambda/network) bottleneck with X-Ray

⚠️ Trap: The phrase "performance degradation" is ambiguous. Model performance degradation (accuracy drop) is the Model Quality Monitor; system performance degradation (latency, errors) is the CloudWatch operational metrics. You must distinguish whether the question sentence is about "accuracy/prediction quality" or "latency/errors/resources" to choose the tool.

3. The Retraining and Redeployment Loop (Day 4)

Detection is not the end. Operations are mature only when the response is automated.

Automation chain:

  1. Model Monitor violation → CloudWatch Alarm
  2. → trigger a SageMaker Pipeline via EventBridge/Lambda
  3. → retrain on the latest data → evaluate
  4. → register in Model Registry only when the criterion passes, via ConditionStep (regression prevention)
  5. → safe redeployment

Redeployment strategy comparison:

StrategyUser impactUse
Shadow0 (responses are only recorded, not sent to users)Risk-free technical validation with production traffic
A/B (variant weights)Some (the new model's responses actually go out)Gradual rollout, comparing business outcomes
Blue/Green and canaryGradual shift + automatic rollbackSafe full replacement

Pick among the three retraining triggers by comparing them as well.

TriggerCostReaction speedTypical scenario phrasing
Drift-basedLow (only when changes occur)Fast"while reducing unnecessary retraining cost"
Performance-basedMediumDelayed by the wait for labels"when accuracy falls below the threshold"
Schedule-basedHigh (always runs)Delayed by the period"regularly every week"

It is easy to memorize as a risk ladder. Safest = shadow (zero user impact) → middle = A/B/canary (gradual exposure to a small number of users) → full = Blue/Green (guardrails and automatic rollback are essential). For retraining triggers too, from a cost perspective a drift-based event trigger is preferred over a schedule-based one.

4. Exam Decision Points

These are the branches for solving Week 8 questions quickly.

  1. Are labels available immediately? Yes → model quality. No → data quality/feature attribution.
  2. Fairness/group bias? → Clarify Bias Drift. Feature importance? → Clarify Feature Attribution.
  3. Accuracy problem vs latency/error problem? → the former is Model Quality Monitor, the latter is CloudWatch operational metrics.
  4. Cause of an error-rate surge? → First split 4XX (client) vs 5XX (server).
  5. Validate a new model with no user impact? → Shadow. Gradual transition and outcome comparison? → A/B.
  6. Reduce retraining cost? → A drift event trigger instead of schedule-based.
  7. Overall latency is slow but the model is normal? → Trace the front-end segment with X-Ray.
  8. Automatically respond to traffic swings? → Application Auto Scaling, not an alarm notification.
  9. Block the risk that a retrained model is worse? → ConditionStep + conditional registration in Model Registry.

It is also quick to have a mapping that jumps from the keywords of the question sentence straight to a service.

Expression in the questionAnswer to recall immediately
"whether the input distribution differs from training"Data quality monitor
"ground truth labels cannot be obtained"Data quality / feature attribution drift
"whether accuracy/F1 is dropping"Model quality monitor (+ ground truth collection)
"whether it is becoming unfavorable to a particular group"Clarify bias drift
"whether the features it depends on have changed"Clarify feature attribution drift (SHAP)
"requests and responses must be stored"Data Capture
"build the standard for normal"Baseline (statistics, constraints, Deequ)
"trace latency by segment"X-Ray
"want to reduce false positives"Raise EvaluationPeriods
"validate with no user impact"Shadow testing
"distribute traffic by weights"Production variant A/B
"automatic rollback"Deployment guardrails (blue/green + CloudWatch alarm)

5. Confusing Pairs Summarized

The points where wrong answers cluster are generally the following four pairs.

Confusing pairOne line that splits them
Data quality vs feature attribution"The value changed" vs "the influence of that value on predictions changed"
Model quality vs CloudWatch metrics"Predictions are wrong" vs "responses are slow or failing"
A/B vs shadowThe new model's response "goes" to users vs "does not go"
Alarm vs Auto Scaling"Notifies a person" vs "automatically adds instances"

6. Comprehensive Diagnosis Table: Symptom → Cause → Action

SymptomCommon causeAction
Monitoring results stay emptyData Capture not configured / zero traffic in that periodCheck the capture S3 path, raise sampling_percentage
The model quality monitor cannot produce metricsGround truth not collected, inference_id mismatchCheck answer upload and ID matching; if none, substitute data quality/attribution
Drift alert but model quality is normalDistribution change in a feature with no performance impactObserve instead of retraining immediately, tier thresholds toward important features
Performance got worse after retrainingUnconditional automatic registration and deploymentRegister only when the criterion passes, using ConditionStep
5XX surge + memory utilization surgeContainer OOM, resource shortageSwitch to a larger-memory type, add instances, reduce batch
Latency exceeds the limit at every traffic surgeAuto Scaling not setRegister an Application Auto Scaling target tracking policy
Failure after full replacement but rollback did not happenNo CloudWatch alarm connected to the guardrailConnect a rollback alarm to the deployment policy and verify in advance
Monitoring and retraining costs are excessiveHourly schedule + 100% capture + schedule-based retrainingRelax the period, lower sampling, switch to event-based triggers

Next week continues into deeper ML solution monitoring and maintenance - security and governance, cost optimization, and advancing the MLOps pipeline.

📖 Glossary

  • Closed loop (MLOps loop): An operating structure that cycles on its own: detect → alarm → retrain → redeploy → detect again.
  • Data Capture: A feature that stores endpoint requests and responses in S3. The raw material for all monitoring.
  • Baseline: A snapshot of the standard for "normal". For data quality it comes out as statistics.json and constraints.json.
  • Data drift / concept drift: The distribution of input X changes / the relationship between X and Y itself changes.
  • Ground truth: The actual answer used to judge whether a prediction was right. A required ingredient of the model quality monitor and usually confirmed late.
  • SHAP attribution drift: An early-warning metric that checks, without labels, whether the ranking and magnitude of feature importance have departed from the baseline.
  • Three pillars of observability: Metrics, logs, traces. CloudWatch Metrics, CloudWatch Logs, and X-Ray correspond to each.
  • Application Auto Scaling: A service that automatically increases or decreases the endpoint's instance count based on a metric. The standard for responding to traffic swings.
  • ConditionStep: A pipeline condition step that allows a model to be registered or deployed only when the evaluation metric clears the bar.
  • Shadow / A/B / deployment guardrails: Risk-free validation that only records responses / validation that exposes part of the users by weight to compare outcomes / a safe-deployment mechanism that attaches alarm-based automatic rollback to blue-green or canary transitions.

📝 Practice Questions

Click a choice to reveal the answer and explanation.

Question 1

In production there is no way at all to collect the model's actual ground truth labels, and you want to detect model performance degradation early. What is the most appropriate combination?

Question 2

On an endpoint, Invocation5XXErrors spiked and ModelLatency also soared. Which area should you suspect first?

Question 3

You want to validate a new model version with production traffic without ever affecting users, and, once sufficiently validated, gradually expose it to some users. Which phased strategy is correct?

Question 4

To have retraining start automatically after Model Monitor detects drift, which service combination best fills the blank? "Model Monitor violation → CloudWatch Alarm → ___ → SageMaker Pipeline execution"

Question 5

In a retraining pipeline, what is the standard mechanism to prevent performance regression when a newly trained model falls short of the evaluation criteria?

PreviousRetraining and Model Maintenance: Automated Retraining Pipelines and A/B and Shadow TestingWeek 8 · Day 4Next SageMaker IAM Security: Execution Roles and Least PrivilegeWeek 9 · Day 1

Official references

  • MLA-C01 official exam page(opens in a new tab)
  • Amazon CloudWatch documentation(opens in a new tab)
  • AWS X-Ray documentation(opens in a new tab)
  • Amazon S3 documentation(opens in a new tab)
  • AWS Lambda documentation(opens in a new tab)
  • Amazon SageMaker AI documentation(opens in a new tab)

On this page

  • Key Takeaways
  • Week 8 on One Page
  • 1. The Four Model Monitor Monitors (Days 1-2)
  • 2. Operational Monitoring: CloudWatch and X-Ray (Day 3)
  • 3. The Retraining and Redeployment Loop (Day 4)
  • 4. Exam Decision Points
  • 5. Confusing Pairs Summarized
  • 6. Comprehensive Diagnosis Table: Symptom → Cause → Action
  • Glossary
  • Practice Questions