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
AIF-C01 · FoundationalAI Practitioner - Foundational
DEA-C01 · AssociateData Engineer - Associate
MLS-C01 · SpecialtyMachine Learning - Specialty
  • Week 1
    • 1.The ML Lifecycle (from a Specialty Perspective)
    • 2.Data Storage for ML: S3, EFS, FSx for Lustre, and Data Formats
    • 3.Data Ingestion: Kinesis, Glue, Batch vs. Streaming
    • 4.Data Labeling: SageMaker Ground Truth, Active Learning, Label Quality
    • 5.Week 1 Comprehensive Review: ML Overview & Data Engineering 1
  • Week 2
    • 1.Data Transformation and ETL: AWS Glue, Spark, and EMR
    • 2.Automating ML Training Pipelines: Step Functions and SageMaker Pipelines
    • 3.Data Augmentation and Synthesis: Handling Scarce and Imbalanced Data
    • 4.Optimizing Training Data Storage and Access: Pipe Mode vs File Mode, FSx for Lustre, and Distributed Training
    • 5.Week 2 Comprehensive Review: From Transformation to Distributed Training Data Supply
  • Week 3
  • Week 4
  • Week 5
  • Week 6
  • Week 7
  • Week 8
  • Week 9
  • Week 10
  • Week 11
  • Week 12
SQLD · 개발자SQL Developer (SQLD)

© CertNote · 주간랩스

  • About
  • Changelog
  • Contact
  • Terms
  • Privacy
← MLS-C01/Week 2/Day 5

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

MLS-C01· AssociateWeek 2 · Day 5~29 min read

Day 5 - Week 2 Comprehensive Review: From Transformation to Distributed Training Data Supply

📌 Key Takeaways

  • Week 2 covered the second axis of data engineering — transformation → automation → augmentation → efficient supply.
  • Glue = serverless, minimal operations, EMR = fine-grained control, multiple frameworks. The decision axes are operational burden, workload type, and framework variety.
  • Step Functions = general-purpose, mixed workflows, SageMaker Pipelines = ML-specific, lineage. A hybrid setup is also standard practice.
  • Imbalance is handled in three layers: data layer (SMOTE) + algorithm layer (weights, thresholds) + evaluation layer (PR-AUC).
  • Data supply has a single goal — making sure expensive GPUs don't sit idle waiting for I/O.

Week 2 Flow at a Glance

[Raw Data]
   │  Day 1: Transformation (ETL)
   ▼  Glue (serverless Spark) / EMR (full-control cluster)
[Cleaned and Processed Data]
   │  Day 2: Pipeline Automation
   ▼  Step Functions (general-purpose) / SageMaker Pipelines (ML-specific) + EventBridge trigger
[Reproducible Training Dataset]
   │  Day 3: Augmentation, Synthesis, Imbalance Handling
   ▼  Augmentation (flip, back-translation) / Synthesis (GAN) / SMOTE, class weights
[Sufficient and Balanced Dataset]
   │  Day 4: Storage and Access Optimization
   ▼  File/Pipe/FastFile mode / FSx for Lustre / ShardedByS3Key
[Efficiently Supplied to Training] → Model Training

Core message: Data preparation doesn't end with a single transformation step. Processing → automation → augmentation → efficient supply all directly affect model quality and cost.

Day 1 Review — Transformation and ETL

  • ETL = Extract → Transform → Load. In ML, the output is a training dataset.
  • AWS Glue: Serverless Spark. Data Catalog, Crawler, ETL Job, DynamicFrame. Minimal operational burden, suitable for sporadic and standard ETL. Billing is by DPU-hour.
  • Amazon EMR: Directly operate Hadoop/Spark/Hive/Presto on EC2 clusters. Suitable for heavy workloads requiring fine-grained tuning, multiple frameworks, and spot savings.
  • Large-scale preprocessing: Parquet columnar format, partitioning (partition pruning), appropriate file sizes, predicate pushdown.
  • Spark intuition: Shuffle is the most expensive operation, and skew dominates job time. Use job bookmarks for incremental processing.

💡 Concept: Three axes for the Glue vs EMR decision — operational burden (minimize → Glue), workload type (short and sporadic → Glue, long and heavy batch → EMR), framework variety (Spark only → Glue, multiple engines → EMR).

Day 2 Review — Pipeline Automation

  • Step Functions: General-purpose orchestrator. Define state machines with ASL (JSON). Strong for mixed ML + non-ML, approvals, external systems, and complex branching.
  • SageMaker Pipelines: ML-specific. Python SDK. ProcessingStep/TrainingStep/TuningStep/ConditionStep/RegisterModel. Built-in lineage and model registry.
  • Selection criteria: Pure ML CI/CD and traceability → SageMaker Pipelines; mixed ML + non-ML and approvals → Step Functions. Combined use is also possible.
  • Triggers: EventBridge (cron/events), S3 event → start pipeline.

⚠️ Pitfall: "It's ML, so definitely SageMaker Pipelines" is an oversimplified wrong answer. If there are many non-ML steps, approvals, or complex branching, Step Functions is more suitable.

Day 3 Review — Augmentation, Synthesis, Imbalance Handling

  • Augmentation: Diversify existing data through label-preserving transformations. Images (flip, rotate, color jitter), text (synonym replacement, back-translation). Preserving domain meaning is essential.
  • Synthesis: Generate new virtual data. GAN, simulation, synthetic tabular data (privacy). Risk of distribution gap → validate with real data.
  • Imbalance handling: Data layer (over/undersampling, SMOTE = interpolated synthesis), algorithm layer (class weights, thresholds), evaluation layer (no accuracy → recall, F1, PR-AUC).

SMOTE, unlike simple duplication, creates new points by interpolating between a minority sample and its nearest neighbors. With an imbalance like 1:999, accuracy gives false reassurance, so evaluation should use recall and PR-AUC.

Day 4 Review — Storage and Access Optimization

OptionOne-line summaryBest for
File modeFull download, then startSmall scale, repeated reads
Pipe modeS3 streaming, immediate startVery large data, sequential processing
FastFile modeStreaming + POSIX accessLarge data + random access
FSx for LustreUltra-fast parallel FS, S3 integrationLarge scale + repeated + low latency + distributed
EFSManaged NFS, multiple mountsShared by several jobs/notebooks
ShardedByS3KeyData split and distributed per nodeData-parallel distributed training
  • Core goal: Make sure expensive GPUs don't sit idle waiting for I/O.
  • Sharding prerequisite: The data must be divided into multiple S3 objects to be effective.
  • Distributed training defaults to data parallelism (replicate the model + split the data); use model parallelism only when the model doesn't fit on a GPU.

🎯 Integrated scenario: "Several TB of data, 8 GPU nodes, startup is too slow." → Split the data into multiple Parquet shards (Day 1) → auto-generate through a pipeline (Day 2) → if imbalanced, SMOTE/weights (Day 3) → supply with ShardedByS3Key + FSx for Lustre (Day 4).

Week 2 Service and Technique Map

RoleTool / techniqueOne line
Serverless ETLAWS GlueSpark transformations without cluster management
MetadataGlue Data CatalogCentral repository for schemas, locations, partitions
No-code cleansingGlue DataBrewVisual cleansing recipes
Big-data clusterAmazon EMRDirectly operate Hadoop, Spark, Hive, Presto
Middle optionEMR ServerlessRun just Spark jobs, no cluster
General orchestrationAWS Step FunctionsConnect heterogeneous services with a state machine
ML pipelineSageMaker PipelinesML-specific CI/CD, lineage built in
TriggerAmazon EventBridgeStart pipelines on cron or events
Preprocessing executionSageMaker ProcessingManaged distributed preprocessing/evaluation jobs
Imbalance correctionSMOTE, class weightsData-layer and algorithm-layer responses
Data supplyFile / Pipe / FastFileStartup delay vs random access
High-speed storageFSx for LustreRepeated, high-throughput training I/O
Distributed allocationShardedByS3KeyAllocate data pieces per node

Complete Summary of Commonly Confused Comparison Points

Confusing pairDecisive difference
Glue vs EMRServerless, minimal operations vs full control, multiple frameworks
Glue Crawler vs Glue ETL JobSchema inference and registration vs actual data transformation
Step Functions vs SageMaker PipelinesGeneral-purpose, mixed workflows vs ML-specific, lineage
Augmentation vs SynthesisTransform existing data vs generate new virtual data
Oversampling vs SMOTESimple duplication vs interpolated synthesis
Undersampling vs class weightsThrow data away vs adjust the penalty in the loss
File vs Pipe vs FastFileFull download vs streaming vs a compromise
FullyReplicated vs ShardedByS3KeyFull replication vs per-node splitting
Data parallel vs model parallelSplit the data vs split the model
accuracy vs PR-AUCFor balanced data vs for extreme imbalance

The question pattern in the MLS-C01 data engineering domain is almost always a trade-off judgment of "cost / operational burden / scale / access pattern." The answer is not a single technology but a choice matching the situation (requirements). The key is training to find clues in the problem such as "minimal operations," "very large data," "random access needed," and "non-ML steps included," and map them.

Passage Clue → Answer Mapping

Phrase in the passageWhat to recall immediately
"Few operations staff," "don't want to manage clusters"Glue or EMR Serverless
"Hive and Presto too," "fine-grained tuning"Amazon EMR
"Cut costs with spot"EMR task nodes
"Approval wait," "integration with external systems"Step Functions
"Lineage," "model registry," "pure ML CI/CD"SageMaker Pipelines
"Run automatically when new data arrives"S3 event / EventBridge
"Positives are 0.2%," "can't catch fraud"SMOTE/class weights + recall/PR-AUC
"Can't use real data because of privacy"Synthetic data
"Labels must not change"Domain-meaning-preserving augmentation
"GPUs wait on downloads"Pipe/FastFile mode
"Repeated training on the same data"FSx for Lustre
"Every node receives the whole dataset"ShardedByS3Key
"The model doesn't fit in GPU memory"Model parallelism

Week 2 Wrong-Answer Notes

  • An always-on EMR cluster just because the data is large — for sporadic workloads, serverless is right.
  • The finer you split partitions, the better — small files explode in number and it actually gets slower.
  • It's ML, so SageMaker Pipelines — if there are many non-ML steps, use Step Functions.
  • Solving failures by increasing the retry count — permission, path, and data problems are not fixed by retries.
  • Applying SMOTE to the validation set too — resampling applies to the training set only. Validation must keep the real distribution.
  • Validating with synthetic data — validation must always use real data.
  • A single giant file + ShardedByS3Key — it can't be split by object, so there is no effect.
  • Sharding the validation channel too — each node sees a different validation set, so the metrics diverge.

Self-Check

Answer these in your head.

  1. Few operations staff and a few standard Spark transformations a day? → Glue serverless ETL
  2. Need Spark, Hive, and Presto together and fine-grained instance tuning? → Amazon EMR
  3. What is the most expensive operation in a Spark job? → Shuffle
  4. To skip data already processed and handle only new data? → Glue job bookmarks
  5. The top-level orchestrator for a workflow mixing approval waits and Lambda post-processing? → Step Functions
  6. Which step expresses "register the model only when accuracy is 0.85 or higher"? → ConditionStep
  7. The technique that grows a minority class by interpolation instead of simple duplication? → SMOTE
  8. Resampling is applied to which dataset only? → The training set only
  9. What do you validate a model trained on synthetic data with? → Real data
  10. To start training immediately on hundreds of GB? → Pipe (or FastFile) mode
  11. Repeating tuning hundreds of times on the same dataset? → FSx for Lustre
  12. The prerequisite for ShardedByS3Key to work? → Data split across multiple S3 objects
  13. If the model doesn't fit in a single GPU's memory? → Model parallelism
  14. What must always go along with long spot-instance training? → Checkpoints

Underlying every choice is a trade-off of cost, operational burden, scale, and access pattern. Next week we move into serious modeling and algorithms on top of this prepared data.

📖 Glossary

  • ETL: Extract, transform, load. In ML, its output is the training dataset itself.
  • DPU: Glue's unit of processing capacity. About 4 vCPU + 16 GB of memory.
  • Shuffle: A Spark operation that redistributes data across nodes by key. The most expensive one.
  • Orchestration: Declaratively managing the execution order, conditions, and retries of multiple steps.
  • Lineage: A record that lets you trace which data, code, and parameters a model came from.
  • SMOTE: Oversampling that creates new samples by interpolating between a minority-class sample and its nearest neighbors.
  • Distribution gap: The risk that the distribution of synthetic/augmented data diverges from reality, lowering real-world performance.
  • Input mode: How S3 data is brought into the training container. File, Pipe, FastFile.
  • ShardedByS3Key: A setting that splits S3 objects per instance so each receives only a different piece.
  • Data parallel / model parallel: Splitting the data and replicating the model / splitting the model itself across several GPUs.

📝 Practice Questions

Click a choice to reveal the answer and explanation.

Question 1

A team with limited operations staff runs standard Spark transformations daily and wants to build ML CI/CD that retrains a model from the results, with lineage tracking. What is the most natural combination?

Question 2

In extremely imbalanced data of 1:999, you want to increase the minority class by synthesizing through interpolation instead of simple duplication, and avoid false reassurance in evaluation. Which combination is appropriate?

Question 3

When training on several TB of data in a data-parallel fashion across 8 nodes, you want to eliminate duplicate downloads on each node and reduce start-up delay. Which design is MOST appropriate?

Question 4

A data transformation workflow mixes non-ML steps (waiting for external approval, Lambda post-processing) with SageMaker training and requires complex branching and retries. Which is the most appropriate top-level orchestrator?

Question 5

When answering tool-selection questions in the MLS-C01 data engineering domain, what is the most essential decision criterion?

PreviousOptimizing Training Data Storage and Access: Pipe Mode vs File Mode, FSx for Lustre, and Distributed TrainingWeek 2 · Day 4Next Data Cleaning: Missing Values, Outlier Detection, Duplicates and ErrorsWeek 3 · Day 1

Official references

  • MLS-C01 official exam page(opens in a new tab)
  • AWS Glue documentation(opens in a new tab)
  • Amazon EMR documentation(opens in a new tab)
  • Amazon SageMaker AI documentation(opens in a new tab)
  • AWS Step Functions documentation(opens in a new tab)
  • Amazon S3 documentation(opens in a new tab)

On this page

  • Key Takeaways
  • Week 2 Flow at a Glance
  • Day 1 Review — Transformation and ETL
  • Day 2 Review — Pipeline Automation
  • Day 3 Review — Augmentation, Synthesis, Imbalance Handling
  • Day 4 Review — Storage and Access Optimization
  • Week 2 Service and Technique Map
  • Complete Summary of Commonly Confused Comparison Points
  • Passage Clue → Answer Mapping
  • Week 2 Wrong-Answer Notes
  • Self-Check
  • Glossary
  • Practice Questions