MLS-C01 Practice Question: Machine Learning Implementation and Operations
A company is building a recommendation system using Amazon SageMaker. The training data includes user-item interactions stored in a DataFrame with over 100 million rows. The data scientist wants to perform feature engineering, including one-hot encoding of categorical features with high cardinality. Which approach is MOST cost-effective and scalable?
⚠ Common exam trap
Many exam-takers choose AWS Glue (Option D) assuming it is the most scalable serverless option, but SageMaker Processing with Spark is more cost-effective and purpose-built for ML feature engineering within the SageMaker ecosystem, avoiding Glue's higher per-DPU costs and slower job startup times for large datasets.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Use SageMaker Processing with a Spark container to distribute the encoding job.
SageMaker Processing with a Spark container allows distributed execution of one-hot encoding on high-cardinality categorical features across a managed cluster, scaling horizontally to handle over 100 million rows without manual infrastructure management. This approach is cost-effective as you pay only for the processing time, and it integrates natively with SageMaker for seamless data pipeline orchestration.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Use Amazon EMR with Spark and store the processed data in HDFS.
Why it's wrong here
Using Amazon EMR with Spark and storing processed data in HDFS introduces persistent cluster management overhead and HDFS storage costs that do not auto-scale to zero when idle, making it less cost-effective than a serverless or managed SageMaker-native approach for a 100-million-row dataset. This option is tempting because EMR with Spark is a robust distributed framework for large-scale data transformation, and it would be correct if the company needed to run complex, multi-step ETL pipelines that are not natively supported by SageMaker's built-in feature engineering capabilities.
- ✓
Use SageMaker Processing with a Spark container to distribute the encoding job.
Why this is correct
SageMaker Processing with Spark provides distributed processing and is cost-effective for large datasets.
- ✗
Use a SageMaker notebook instance with scikit-learn to perform the encoding in memory.
Why it's wrong here
A single notebook instance may run out of memory with 100M rows.
- ✗
Use AWS Glue ETL jobs to perform the encoding and store the result in S3.
Why it's wrong here
Glue is serverless but can be more expensive than SageMaker Processing for this workload.
Go deeper
Related to this question
About these practice questions
One of 1,672 original MLS-C01 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This MLS-C01 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the MLS-C01 exam.