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

Lesson 2 of 8 · 18 min

x
2/8

Domain 1: Data Preparation for ML and AI (Part 2 of 2)

This lesson covers 5 exam topics: Feature Engineering and SageMaker Feature Store, Embeddings, Text Pre-processing and RAG Document Prep, Masking Data and Preparing FM Training Data, Data Quality, Cleaning and Labelling, Bias and Class Imbalance. Each topic has a short video, then the notes: key facts, exam traps and what to check in the official docs.

1. Feature Engineering and SageMaker Feature Store

Video lesson: MLA-C02 06/35: Feature Engineering and SageMaker Feature Store

Central question: How do you turn raw columns into good features, and share them consistently between training and serving?

Techniques named in the guide (general background)

TechniqueDoesExample
Scaling / normalizationRescale to a range, e.g. 0–1 (min-max)Distances for k-NN
StandardizationZero mean, unit variance (z-score)Linear models, neural nets
Log transformationCompress skewed valuesIncome, transaction amounts
BinningGroup continuous values into bucketsAge bands
Feature splittingSplit one field into partsDate → day of week, hour
Encoding (related)One-hot, label or target encoding of categoriesCountry codes

Fit scalers on training data only, then apply to validation and test data, to avoid leakage (general background).

SageMaker Feature Store

  • Create, store, share and manage features in feature groups (with metadata; schemas can evolve).
  • Online store: keeps only the latest record per entity; low-millisecond reads, high-throughput writes → real-time inference.
  • Offline store: keeps all records as history → data exploration, training and batch prediction.
  • Consistent feature processing reduces training-serving skew (the difference between training and serving that hurts accuracy).
  • Ingest from batch jobs or streams (skill 1.1.9).

Exam traps

  • Online store for training history. It only keeps the latest record.
  • Fitting the scaler on all data before splitting (leakage).
  • Different feature code in training and serving (skew).

2. Embeddings, Text Pre-processing and RAG Document Prep

Video lesson: MLA-C02 07/35: Embeddings, Text Pre-processing and RAG Document Prep

Central question: How do you turn text and images into vectors, and prepare documents for RAG?

Embedding models (verified where linked)

  • Convert text and images into numerical vectors where similar meaning sits close together.
  • Amazon Titan Text Embeddings V2: up to 8,192 tokens in, 1,024-dimension vector out; Bedrock throttles embedding models by requests per minute.
  • Multimodal embedding models place images and text in one space (image search by text).
  • Use the same model for documents and queries; batch-generate embeddings for indexing.

Text pre-processing (skill 1.2.6; general background)

  • Tokenization: split text into the units a model uses (subword tokens for FMs).
  • Normalisation: casing, whitespace, Unicode, removing boilerplate.
  • Domain-specific augmentation: add synonyms, paraphrases or domain terms to enrich training or retrieval data.

Preparing documents for RAG (skill 1.2.7; verified in Bedrock KB docs)

StepOptions
ParseDefault text parser; Bedrock Data Automation or an FM parser for tables, charts, images
ChunkDefault (~300 tokens), fixed-size with overlap, hierarchical (parent/child), semantic, none, or a custom Lambda
Metadata extractionTitle, section, date, author, access group — for filtering and citations

Exam traps

  • Different embedding models for indexing and querying.
  • Default parser for chart-heavy PDFs.
  • One chunk size for every document type without testing.

3. Masking Data and Preparing FM Training Data

Video lesson: MLA-C02 08/35: Masking Data and Preparing FM Training Data

Central question: How do you protect sensitive data and build clean, safe datasets for FM customization?

Mask, redact, anonymize (skill 1.2.8)

TechniqueMeans
MaskingReplace part of a value (****1234)
RedactionRemove the value entirely
Anonymization / pseudonymizationReplace identities with tokens; keep a secure mapping only if needed

AWS help (verified): Amazon Macie finds PII in S3; Amazon Comprehend detects PII in text; Bedrock Guardrails sensitive information filters mask PII in prompts and responses; Glue and DataBrew transforms can mask columns.

Data for FM customization (skill 1.2.9; verified in Bedrock docs)

MethodData
Supervised fine-tuningLabelled prompt–response pairs in JSONL
Continued pre-trainingLarge unlabelled domain text
DistillationPrompts (optionally labelled pairs or invocation logs); Bedrock generates teacher responses and fine-tunes the student

Validating training data integrity (skill 1.3.6; design guidance)

  • Prompt–response pair validation: schema check, non-empty fields, correct roles, length within limits, no duplicates.
  • Content safety screening: remove toxic, unsafe or copyrighted content; run guardrails or classifiers over the set.
  • Check representativeness and remove PII you are not allowed to use.

Exam traps

  • Unlabelled text for supervised fine-tuning.
  • Training on raw PII that should have been masked.
  • Skipping safety screening: the model learns what you feed it.

4. Data Quality, Cleaning and Labelling

Video lesson: MLA-C02 09/35: Data Quality, Cleaning and Labelling

Central question: Is the data correct, complete and labelled well enough to train on?

Validating quality (skill 1.3.1; verified)

  • AWS Glue Data Quality: rules in DQDL, managed and serverless (built on Deequ); stop pipelines on failures.
  • AWS Glue DataBrew: data profiles and quality rules in a visual tool.
  • Data Wrangler (in Canvas): Data Quality and Insights report.

Cleaning (skill 1.3.7; general background)

ProblemOptions
OutliersDetect (z-score, IQR, Random Cut Forest); cap, remove or keep with reason
Missing dataDrop, impute (mean/median/mode, model-based), or add a "missing" indicator
DuplicatesDeduplicate on keys or near-duplicate detection
Inconsistent formatsStandardise units, dates, categories

Labelling (skill 1.3.2)

  • SageMaker Ground Truth: human labelling with Mechanical Turk, vendor or private workforces; automated data labelling uses ML to decide what needs humans. No longer open to new customers (verified).
  • Alternatives: private labelling workflows, vendor tools, or FMs to pre-label with human review (design guidance).
  • Quality: clear instructions, multiple annotators per item, consensus and audits.

Exam traps

  • Dropping every row with a missing value and losing most of the data.
  • Removing all outliers that may be the very events (fraud) you want to detect.
  • Recommending Ground Truth to a new customer without noting its status.

5. Bias and Class Imbalance

Video lesson: MLA-C02 10/35: Bias and Class Imbalance

Central question: Does the data represent everyone fairly, and are the classes balanced enough to learn from?

Measuring data bias with SageMaker Clarify

Pre-training bias metrics include Class Imbalance (CI), Difference in Proportions of Labels (DPL), Kullback-Leibler (KL) and Jensen-Shannon (JS) divergence, Lp-norm (LP), Total Variation Distance (TVD), Kolmogorov-Smirnov (KS) and Conditional Demographic Disparity (CDD). Clarify also measures bias in model predictions after training.

Apply bias metrics across numeric, text and image assets (skill 1.3.4), e.g. representation of groups in image datasets, language balance in text (design guidance).

Mitigating bias in data (skill 1.3.3)

  • Dataset splitting that is stratified, so each split keeps the same group and class mix.
  • Shuffling before splitting to avoid ordered bias.
  • Augmentation to add examples for under-represented groups.
  • Remove proxy features; check label quality.

Class imbalance (skill 1.3.5; general background)

TechniqueHow
Oversample minorityDuplicate or synthesize (e.g. SMOTE for tabular)
Undersample majorityDrop majority examples
Class weightsPenalise minority errors more (e.g. XGBoost scale_pos_weight)
AugmentationImages: flips, crops; text: paraphrases
Right metricsPrecision, recall, F1, PR-AUC — not accuracy

Exam traps

  • Accuracy on a 1% fraud dataset.
  • Random split that leaves the minority class out of the validation set.
  • Oversampling before splitting, leaking copies into validation.

References

  1. MLA-C02 Domain 1 — checked Oct 19, 2026
  2. SageMaker Feature Store — checked Oct 19, 2026
  3. Titan Text Embeddings — checked Oct 19, 2026
  4. KB chunking — checked Oct 19, 2026
  5. KB parsing — checked Oct 19, 2026
  6. Bedrock customization — checked Oct 19, 2026
  7. Model distillation — checked Oct 19, 2026
  8. Amazon Macie — checked Oct 19, 2026
  9. AWS Glue Data Quality — checked Oct 19, 2026
  10. SageMaker Ground Truth — checked Oct 19, 2026
  11. AWS Glue DataBrew — checked Oct 19, 2026
  12. SageMaker Clarify pre-training bias metrics — checked Oct 19, 2026

Check your understanding

  • Low-latency latest features for a real-time endpoint?Show answer

    Answer

    Feature Store online store.
  • Text-and-image search in one index?Show answer

    Answer

    A multimodal embedding model.
  • Find PII in S3 before fine-tuning?Show answer

    Answer

    Amazon Macie.
  • Enforce "no nulls in customer_id" as pipeline rules?Show answer

    Answer

    Glue Data Quality (DQDL).
  • Clarify metric for how unevenly classes or groups are represented?Show answer

    Answer

    Class Imbalance (CI).
Previous

Progress is saved in this browser.

Next Lesson