Skip to content
AWS Certified Machine Learning Engineer – Associate (MLA-C02) Exam Prep

Lesson 3 of 8 · 18 min

x
3/8

Domain 2: ML Model and Foundation Model (FM) Development (Part 1 of 2)

This lesson covers 5 exam topics: Choosing Models: ML, FMs and AWS AI Services, Performance, Latency and Cost Tradeoffs, RAG Patterns and Retrieval Optimization, SageMaker Built-in Algorithms and Script Mode, Hyperparameter Tuning and Faster Training. Each topic has a short video, then the notes: key facts, exam traps and what to check in the official docs.

1. Choosing Models: ML, FMs and AWS AI Services

Video lesson: MLA-C02 11/35: Choosing Models: ML, FMs and AWS AI Services

Central question: Managed AI service, foundation model, pre-trained model or custom model?

The options (verified where linked; ordering is design guidance)

OptionExampleEffortUse when
AWS AI serviceTextract (documents), Rekognition (images), Comprehend (NLP), Transcribe (speech)LowestThe task matches the service
Foundation model on BedrockSummaries, extraction, chat, agentsLowLanguage/multimodal tasks; little labelled data
Pre-trained modelSageMaker JumpStart open modelsMediumNeed hosting control or open weights
Custom modelXGBoost churn model in SageMaker AIHighestNarrow prediction on your structured data; interpretability

Selecting an FM on Bedrock (skill 2.1.1)

Shortlist by modality, context length, languages, latency and price; evaluate candidates on your own data with Bedrock evaluations; pick the smallest model that meets the bar.

Selecting ML models (skill 2.1.3)

Weigh interpretability (linear models, trees vs deep nets), domain-specific performance, latency and data size. SageMaker solution templates (JumpStart) speed common use cases.

Exam traps

  • Training a custom OCR model when Textract fits.
  • An FM for a regulated tabular decision that needs feature-level reasons.
  • Choosing an FM on benchmarks alone.

2. Performance, Latency and Cost Tradeoffs

Video lesson: MLA-C02 12/35: Performance, Latency and Cost Tradeoffs

Central question: How much accuracy is worth how much training time, latency and money?

Traditional ML (skill 2.1.6; general background plus verified items)

LeverTrade
Bigger model / more featuresAccuracy up; training time, cost, latency up
More data, more epochsAccuracy up (to a point); cost up
Managed Spot TrainingUp to 90% lower training cost; jobs can be interrupted (use checkpoints) (verified)
Early stoppingLess time and cost; less overfitting
Distributed trainingFaster wall-clock; more instances

AI / FMs (skill 2.1.7)

LeverTrade
Larger FMQuality up; latency and token cost up
Smaller or distilled modelFaster, cheaper; validate quality
Longer prompts / more retrieved chunksContext up; tokens and latency up
Batch inference~50% cheaper; not interactive (verified, Bedrock pricing)
Provisioned throughputGuaranteed capacity; paid hourly

Decide with numbers: plot quality against cost and latency for each candidate and pick the point that meets the requirement (design guidance).

Exam traps

  • Maximum accuracy at any cost when the requirement is "good enough, cheap and fast".
  • Spot without checkpoints for long jobs.
  • Ignoring inference cost when choosing a bigger model.

3. RAG Patterns and Retrieval Optimization

Video lesson: MLA-C02 13/35: RAG Patterns and Retrieval Optimization

Central question: Which RAG architecture fits, and how do you make retrieval better?

RAG patterns (design guidance; Bedrock features verified)

PatternUse when
Managed Knowledge Base (retrieve-and-generate)Standard Q&A over documents; least to build
Retrieve-only + your own generationCustom prompts, multiple models
Hybrid search (vectors + keywords)Exact terms such as product codes
Structured-data retrieval (text-to-SQL KB)Answers live in tables
Graph RAG (Neptune Analytics)Relationships between entities matter
Agentic retrievalMulti-hop questions across sources

Optimizing retrieval (skill 2.2.9)

  • Chunking: tune size and overlap; hierarchical for precision plus context.
  • Embedding model: test domain fit and dimensions; same model for queries.
  • Reranking with a Bedrock reranker model.
  • Metadata filters to narrow the search.
  • Query reformulation / decomposition for complex questions.
  • Measure with a retrieval test set (relevance, context recall) after each change.

Exam traps

  • Changing the generation model to fix poor retrieval.
  • Semantic-only search for exact identifiers.
  • Tuning without a retrieval test set.

4. SageMaker Built-in Algorithms and Script Mode

Video lesson: MLA-C02 14/35: SageMaker Built-in Algorithms and Script Mode

Central question: Which built-in algorithm fits the problem, and when do you bring your own training script?

Built-in algorithms (verified names; use cases are general background)

ProblemAlgorithms
Tabular classification/regressionXGBoost, LightGBM, CatBoost, Linear Learner, AutoGluon-Tabular, TabTransformer, k-NN, Factorization Machines (sparse data, recommendations)
Clustering / dimensionality reductionK-Means, PCA
Anomaly detectionRandom Cut Forest (RCF), IP Insights (unusual IP usage)
Time series forecastingDeepAR
TextBlazingText (Word2Vec, text classification), Text Classification - TensorFlow, Sequence-to-Sequence, LDA and Neural Topic Model (topics), Object2Vec (embeddings)
VisionImage Classification, Object Detection, Semantic Segmentation

Script mode (skill 2.2.2)

Bring your own training script for a supported framework (PyTorch, TensorFlow, scikit-learn, XGBoost, Hugging Face) and run it in an AWS-managed framework container: SageMaker provides the container, you provide the code and dependencies (general background). It's simpler than building your own container and keeps managed features (spot, distributed training, metrics).

Exam traps

  • K-Means for labelled classification.
  • Linear Learner for a time-series forecast that DeepAR handles.
  • Building a custom container when script mode with a framework container works.

5. Hyperparameter Tuning and Faster Training

Video lesson: MLA-C02 15/35: Hyperparameter Tuning and Faster Training

Central question: How do you find good hyperparameters without burning budget, and train faster?

SageMaker AI automatic model tuning (AMT) strategies

StrategyHowNotes
Grid searchEvery combination of categorical valuesOnly categorical parameters
Random searchRandom combinations; independent of past jobsMax parallelism without hurting results
Bayesian optimizationTreats tuning as regression; picks next values from past resultsEfficient for expensive jobs; less parallel
HyperbandMulti-fidelity; reallocates epochs to promising configs and stops weak onesFastest for iterative algorithms that report per epoch

Early stopping (verified): stop training jobs that aren't improving on the objective metric (TrainingJobEarlyStoppingType = AUTO): saves compute and reduces overfitting.

Training time reduction (skill 2.2.4)

  • Distributed training (verified): data parallel (replicas of the model, split batches; global batch = replicas × per-replica batch) or model parallel (split a model too big for one GPU).
  • Early stopping, Spot with checkpoints, faster input (fast file mode, FSx for Lustre).

Fundamental hyperparameters (skill 2.2.7; general background)

HyperparameterEffect
EpochsPasses over the data; too many → overfit
Batch sizeLarger = faster per epoch, more memory, may generalise worse
StepsUpdates per run (= samples × epochs ÷ batch)
Learning rateToo high → diverges; too low → slow

Exam traps

  • Grid search over continuous ranges. Grid supports categorical only.
  • Hyperband for non-iterative algorithms.
  • Data parallelism when the model doesn't fit one GPU. That needs model parallelism.

References

  1. MLA-C02 Domain 2 — checked Oct 19, 2026
  2. Bedrock evaluations — checked Oct 19, 2026
  3. SageMaker JumpStart — checked Oct 19, 2026
  4. Managed Spot Training — checked Oct 19, 2026
  5. Bedrock pricing — checked Oct 19, 2026
  6. Bedrock Knowledge Bases — checked Oct 19, 2026
  7. Reranking — checked Oct 19, 2026
  8. KB query configuration — checked Oct 19, 2026
  9. SageMaker built-in algorithms — checked Oct 19, 2026
  10. AMT strategies — checked Oct 19, 2026
  11. Early stopping — checked Oct 19, 2026
  12. Distributed training — checked Oct 19, 2026

Check your understanding

  • Extract fields from invoices with no training?Show answer

    Answer

    Amazon Textract.
  • Cut training cost up to 90%, tolerate interruptions?Show answer

    Answer

    Managed Spot Training with checkpoints.
  • Questions mix product codes and natural language?Show answer

    Answer

    Hybrid search.
  • Forecast demand across many related products?Show answer

    Answer

    DeepAR.
  • Expensive training, want fewest jobs to a good result?Show answer

    Answer

    Bayesian optimization.
Previous

Progress is saved in this browser.

Next Lesson