- Authors

- Name
- Youngju Kim
- @fjvbn20031
1. MLS-C01 Exam Overview
The AWS Machine Learning Specialty (MLS-C01) is an advanced certification that validates the ability to design, implement, and operate ML solutions on the AWS platform.
| Item | Details |
|---|---|
| Exam Duration | 180 minutes |
| Number of Questions | 65 |
| Passing Score | 750 (out of 1000) |
| Question Format | Multiple choice, multiple response |
| Exam Fee | USD 300 |
| Validity | 3 years |
Domain Weights
| Domain | Weight |
|---|---|
| Data Engineering | 24% |
| Exploratory Data Analysis | 36% |
| Modeling | 30% |
| ML Implementation and Operations | 10% |
2. Key AWS ML Services Summary
2.1 SageMaker Core Features
| Feature | Description |
|---|---|
| Studio | Integrated ML IDE |
| Data Wrangler | Data preparation and feature engineering |
| Feature Store | Feature storage and reuse |
| Training Jobs | Managed model training |
| Hyperparameter Tuning | Automated hyperparameter optimization |
| Autopilot | AutoML |
| Endpoints | Real-time / batch / async / serverless inference |
| Pipelines | MLOps workflows |
| Model Monitor | Data and model drift detection |
| Clarify | Bias detection and explainability |
2.2 SageMaker Built-in Algorithms
| Algorithm | Use Case |
|---|---|
| XGBoost | Classification, regression (tabular data) |
| Linear Learner | Linear classification and regression |
| KNN | K-Nearest Neighbors |
| DeepAR | Time-series forecasting |
| BlazingText | Text classification, Word2Vec |
| Object Detection | Object detection |
| Semantic Segmentation | Pixel-level classification |
| Seq2Seq | Machine translation, summarization |
| LDA | Topic modeling |
| PCA | Dimensionality reduction |
| IP Insights | IP-based anomaly detection |
2.3 Kinesis Service Comparison
| Service | Purpose | Key Features |
|---|---|---|
| Kinesis Data Streams | Real-time streaming | Custom consumers, 7–365 day retention |
| Kinesis Data Firehose | ETL pipeline | Auto-delivery to S3/Redshift/OpenSearch |
| Kinesis Data Analytics | Real-time analytics | SQL / Apache Flink |
2.4 Data Services
| Service | Purpose |
|---|---|
| S3 | Data lake storage |
| Glue | Serverless ETL, metadata catalog |
| Athena | SQL queries on S3 |
| Lake Formation | Data lake setup and security |
| Redshift | Data warehouse |
3. Practice Questions (Q1-Q65)
Data Engineering (Q1-Q16)
Q1. How should data be partitioned so large CSV files in S3 can be queried efficiently with Athena?
A) Partition by file size B) Hive-style partitioning on columns frequently used in filters (e.g., date, region) C) Random partitioning D) Apply compression only, no partitioning
Answer: B
Explanation: For Athena performance, use Hive-style partitioning: s3://bucket/data/year=2024/month=03/day=01/. Partitioning on columns commonly found in WHERE clauses reduces data scanned, cutting cost and query time. Combine with columnar formats like Parquet or ORC for even better performance.
Q2. What configuration should you use to optimize AWS Glue ETL job cost?
A) On-demand Worker Type B) Increase to G.1X Worker Type C) Enable Job Bookmarks to avoid reprocessing D) Always use maximum DPUs
Answer: C
Explanation: Enabling AWS Glue Job Bookmarks tracks previously processed data so only new data is processed on each run. This prevents duplicate processing and reduces cost. Flex execution (flexible execution class) also helps with cost optimization.
Q3. What is the main difference between Kinesis Data Streams and Kinesis Data Firehose?
A) No difference; they are the same service B) Streams supports custom consumers and reprocessing; Firehose delivers automatically to S3/Redshift/etc. C) Firehose has lower latency D) Streams can only store data in S3
Answer: B
Explanation: Kinesis Data Streams allows multiple independent consumers, parallel processing via shards, and reprocessing within the retention window. Kinesis Data Firehose is a fully managed, near-real-time service that delivers data to S3, Redshift, OpenSearch, or Splunk without code.
Q4. What are the key benefits of using SageMaker Feature Store?
A) Faster model training B) Consistent feature reuse, prevention of training-serving skew, and point-in-time feature retrieval C) Cost reduction D) Automatic hyperparameter tuning
Answer: B
Explanation: SageMaker Feature Store manages ML features in an online store (low-latency lookup) and an offline store (large-scale batch training). Multiple teams can reuse features, training-serving skew is prevented, and time-based point-in-time queries avoid data leakage.
Q5. What can Lake Formation fine-grained access control govern?
A) S3 bucket policies B) Access permissions at the database, table, column, and row levels C) EC2 instance access D) IAM policies only
Answer: B
Explanation: Lake Formation supports fine-grained access control down to the Glue Data Catalog database, table, and column level. Row filters further restrict which rows a specific user can see. This is more granular than IAM policies alone.
Q6. Which AWS service combination is suitable for computing aggregated statistics from real-time streaming data?
A) S3 + Athena B) Kinesis Data Streams + Kinesis Data Analytics (Apache Flink) C) DynamoDB + Lambda D) RDS + EC2
Answer: B
Explanation: Kinesis Data Streams ingests real-time data; Kinesis Data Analytics for Apache Flink performs windowed aggregations, filtering, and transformations in real time. Results can be written back to Kinesis Streams or S3.
Q7. Which service automatically discovers schemas in S3 and registers them in the Glue Data Catalog?
A) AWS Glue Crawler B) AWS Glue Studio C) AWS Data Pipeline D) AWS Batch
Answer: A
Explanation: AWS Glue Crawler scans data sources such as S3, RDS, and DynamoDB, automatically infers schemas, and creates table metadata in the Glue Data Catalog. It can run on a schedule or on demand.
Q8. How do you securely share data in an S3-based data lake with another AWS account?
A) Set the S3 bucket to public B) Use Lake Formation Data Sharing or add the external account's ARN to the S3 bucket policy C) Email the data D) Use cross-region replication only
Answer: B
Explanation: Use Lake Formation cross-account sharing via AWS RAM (Resource Access Manager), or add the external account's IAM ARN to the S3 bucket policy. Lake Formation cross-account sharing preserves column/row-level access control while sharing data.
Q9. How do you automate the raw-data-to-features transformation step in an ML pipeline with SageMaker?
A) Use only SageMaker Training Jobs B) Define transformations in SageMaker Data Wrangler, then automate with SageMaker Pipelines C) Run pandas scripts manually D) Use AWS Batch
Answer: B
Explanation: SageMaker Data Wrangler provides a GUI with 300+ built-in transformations for feature engineering. Defined transformations can be exported as SageMaker Processing Jobs and integrated into SageMaker Pipelines to automate the end-to-end ML workflow.
Q10. How can you transform data in Kinesis Data Firehose before it reaches S3?
A) A separate EC2 instance is required B) Connect a Lambda function as a Data Transformation C) Directly invoke a Glue ETL job D) Transformation is not possible
Answer: B
Explanation: Kinesis Data Firehose supports Lambda functions as data transformation targets. Each record passes through the Lambda function (for filtering, format conversion, enrichment, etc.) before being delivered to the destination such as S3.
Q11. What is the most efficient way to load a large ML dataset into SageMaker training?
A) Copy the entire dataset to local EBS first B) Use Pipe mode or FastFile mode instead of File mode C) Move data to EFS before training D) Decompress data before use
Answer: B
Explanation: SageMaker training data input modes: File mode copies all data before training starts. Pipe mode streams data from S3. FastFile mode (recommended) mounts S3 directly, allowing training to start immediately without copying all data first, saving time on large datasets.
Q12. What is the main feature of AWS Glue Studio?
A) Machine learning model training B) Visually design and run ETL pipelines without code C) Database management D) Real-time streaming processing only
Answer: B
Explanation: AWS Glue Studio provides a drag-and-drop interface for visually building ETL pipelines. It generates and monitors Spark-based ETL jobs without code, and allows direct editing of the generated Python or Scala code.
Q13. Which service automatically detects and helps mask sensitive PII data in a data lake?
A) Amazon Macie B) AWS Shield C) Amazon GuardDuty D) AWS WAF
Answer: A
Explanation: Amazon Macie uses ML to automatically detect sensitive data (credit card numbers, SSNs, PII, etc.) in S3 buckets. Findings integrate with Security Hub, and Glue ETL can be used for masking.
Q14. What are SageMaker Processing Jobs primarily used for?
A) Model serving B) Running ML workflow tasks such as preprocessing, postprocessing, model evaluation, and feature engineering C) Hyperparameter tuning D) A/B testing
Answer: B
Explanation: SageMaker Processing Jobs are fully managed and handle data preprocessing, feature engineering, model evaluation, and post-deployment analysis. They support built-in containers (Scikit-learn, Spark, XGBoost) or custom containers.
Q15. What architecture ingests streaming data from multiple sources into an S3 data lake?
A) RDS → Lambda → S3 B) Sources → Kinesis Data Streams → Kinesis Data Firehose → S3 C) EC2 → EBS → S3 D) DynamoDB → S3 direct copy
Answer: B
Explanation: Multiple data sources send real-time data to Kinesis Data Streams. Kinesis Data Firehose applies buffering, compression, and encryption before storing to S3. Firehose also supports dynamic partitioning based on partition keys.
Q16. Why would you customize a classifier in AWS Glue Crawler?
A) Performance improvement B) To handle custom data formats or delimiters that the default classifiers cannot recognize C) Cost reduction D) Security enhancement
Answer: B
Explanation: Default Glue classifiers support common formats like CSV, JSON, Parquet, and ORC. Custom classifiers (Grok, XML, JSON, CSV) are needed for fixed-width formats, non-standard delimiters, or non-standard data formats to ensure accurate schema detection.
Exploratory Data Analysis (Q17-Q40)
Q17. Which is NOT a correct way to handle class imbalance in ML training data?
A) SMOTE (Synthetic Minority Over-sampling Technique) B) Undersampling the majority class C) Adjusting class weights D) Collecting no additional data and using accuracy only
Answer: D
Explanation: Accuracy is misleading with class imbalance. Correct approaches: SMOTE (generate synthetic minority samples), undersampling the majority class, adjusting class weights, and collecting more data. Use metrics like AUC-ROC, F1-score, and Precision-Recall curves instead.
Q18. How do you check the distribution of numeric variables and detect outliers in SageMaker Data Wrangler?
A) Download raw data and analyze locally B) Use Data Wrangler's Data Quality and Insights Report C) Manually write SQL queries D) Analyze on a separate EC2 instance
Answer: B
Explanation: SageMaker Data Wrangler's Data Quality and Insights Report automatically generates per-column statistics (mean, median, std, distribution), missing values, outliers, class imbalance, and data type information — enabling fast EDA.
Q19. What problem arises when One-Hot Encoding a high-cardinality categorical variable, and how is it solved?
A) No problem B) Curse of dimensionality from high-cardinality variables — use Target Encoding or embeddings C) Apply it to numeric variables too D) Label Encoding is always better
Answer: B
Explanation: Applying One-Hot Encoding to variables with hundreds or thousands of categories produces very sparse, high-dimensional vectors. Target Encoding (replacing categories with the target mean), embeddings, or Frequency Encoding are more effective alternatives.
Q20. Which technique does SageMaker Clarify use to explain the influence of specific features on predictions?
A) Confusion Matrix B) SHAP (SHapley Additive exPlanations) C) ROC Curve D) Learning Curve
Answer: B
Explanation: SageMaker Clarify uses SHAP (based on Shapley game theory) to explain each feature's contribution to predictions. It provides both global explanations (feature importance over the entire dataset) and local explanations (per-prediction feature contributions).
Q21. Which is NOT a proper way to handle missing values in training data?
A) Mean/median/mode imputation B) KNN imputation C) Drop rows/columns (when the proportion is small) D) Feed missing values directly into the model
Answer: D
Explanation: Most ML algorithms cannot handle missing values. Correct approaches: statistical imputation (mean, median, mode), KNN imputation, prediction-based imputation, or dropping rows/columns when the proportion is small. XGBoost handles missing values internally.
Q22. Which is NOT a valid normalization technique for scaling differences between features?
A) Min-Max Normalization B) StandardScaler (Z-score normalization) C) Robust Scaler (uses median and IQR) D) No scaling at all (except for tree-based models)
Answer: D
Explanation: Distance-based algorithms (KNN, SVM, neural networks) are sensitive to scale. Min-Max maps to [0,1]; StandardScaler produces mean=0, std=1; RobustScaler is robust to outliers. Tree-based models (Random Forest, XGBoost) are relatively scale-invariant, but other algorithms require scaling.
Q23. Which metrics does SageMaker Clarify use to detect bias in training data?
A) RMSE B) Class Imbalance (CI), Difference in Positive Proportions in Labels (DPL) C) AUC-ROC D) F1-score
Answer: B
Explanation: SageMaker Clarify provides pre-training bias metrics (DPL: difference in label proportion across groups; CI: class imbalance, etc.) and post-training model bias metrics (DPPL: difference in predicted positive proportions). These evaluate fairness across demographic groups.
Q24. Which preprocessing technique removes seasonality and trend from time-series data?
A) Normalization B) Differencing and seasonal decomposition C) Applying PCA D) One-hot encoding
Answer: B
Explanation: To achieve stationarity in time-series data, apply differencing (first-order, seasonal). Use statsmodels' seasonal_decompose or STL decomposition to separate trend, seasonal, and residual components. This preprocessing is critical for ARIMA, SARIMA, and DeepAR.
Q25. How should date/time data be prepared for use in ML?
A) Convert only to Unix timestamp B) Decompose into year, month, day, day-of-week, hour, week number, and other features C) Remove date features D) Use the raw string directly
Answer: B
Explanation: Extract year, month, day, day-of-week, time-of-day, quarter, week number, and whether it's a holiday from date/time fields. Cyclical features like day-of-week or month should be sin/cos-encoded to preserve continuity. This captures seasonality and weekly patterns.
Q26. Which correlation coefficient measures the linear relationship between two numeric variables?
A) Spearman correlation B) Pearson correlation C) Kendall's tau D) Chi-square statistic
Answer: B
Explanation: Pearson correlation measures the strength of the linear relationship between two continuous variables on a scale of -1 to 1. Spearman is rank-based (monotonic non-linear), Kendall measures rank concordance. Spearman is more commonly used in ML preprocessing due to its robustness to outliers.
Q27. How do you quickly check feature importance in SageMaker Data Wrangler?
A) Separate training required B) Use the Quick Model feature to automatically compute feature importance C) Manual correlation analysis D) Not possible
Answer: B
Explanation: Data Wrangler's Quick Model feature quickly trains a Random Forest on the selected target variable and visualizes each feature's importance. This is useful for feature selection and data quality assessment.
Q28. Which combination of metrics is appropriate for evaluating a classification model?
A) RMSE, MAE, R2 B) Precision, Recall, F1-score, AUC-ROC C) BLEU, Perplexity D) MAPE, SMAPE
Answer: B
Explanation: Classification metrics: Precision (true positives among predicted positives), Recall (true positives found among all actual positives), F1-score (harmonic mean of Precision and Recall), AUC-ROC (threshold-independent performance measure). For imbalanced data, F1-score and AUC-PR (area under the Precision-Recall curve) are especially important.
Q29. Which unsupervised dimensionality reduction technique is used to visualize high-dimensional data?
A) Linear Regression B) t-SNE, PCA, UMAP C) Random Forest D) KNN
Answer: B
Explanation: PCA is a linear dimensionality reduction that maximizes variance. t-SNE preserves local structure in high-dimensional data for cluster visualization. UMAP is faster than t-SNE and also preserves global structure. SageMaker includes PCA as a built-in algorithm.
Q30. Which regression evaluation metric is most robust to outliers?
A) RMSE (Root Mean Squared Error) B) MAE (Mean Absolute Error) C) R2 (coefficient of determination) D) MAPE
Answer: B
Explanation: RMSE squares errors, making it sensitive to outliers. MAE takes the mean of absolute errors, reducing outlier influence. Use RMSE when large errors deserve extra penalty. R2 measures how much data variance the model explains.
Q31. Which step is NOT part of text data preprocessing for ML?
A) Tokenizing B) Removing stopwords C) Image augmentation D) TF-IDF vectorization
Answer: C
Explanation: Text preprocessing includes tokenizing, lowercasing, removing stopwords, stemming/lemmatization, and vectorization (TF-IDF, Word2Vec, etc.). Image augmentation is a computer vision technique, not a text preprocessing step.
Q32. How do you detect multicollinearity in a dataset?
A) Cross-validation B) Calculate VIF (Variance Inflation Factor) or use a correlation heatmap C) Adjust the learning rate D) Change batch size
Answer: B
Explanation: Multicollinearity arises from strong correlations between independent variables. A VIF greater than 10 indicates multicollinearity. A correlation heatmap provides a visual assessment. Solutions include Ridge Regression or PCA to address the issue.
Q33. Which SageMaker built-in algorithm is suited for anomaly detection?
A) Linear Learner B) Random Cut Forest (RCF) and IP Insights C) BlazingText D) DeepAR
Answer: B
Explanation: SageMaker Random Cut Forest (RCF) is an unsupervised anomaly detection algorithm that computes an anomaly score for each data point. IP Insights learns normal usage patterns for IP addresses and detects unusual access.
Q34. What happens when the classification threshold is lowered from 0.5?
A) Precision increases and Recall decreases B) Recall increases and Precision decreases C) AUC-ROC increases D) No change
Answer: B
Explanation: Lowering the threshold predicts more positives, increasing Recall (catching more true positives) but decreasing Precision (more false positives). Use a lower threshold when minimizing false negatives is critical (e.g., fraud detection). AUC-ROC is a threshold-independent metric.
Q35. What indicates overfitting in a model?
A) Both training and validation errors are high B) Training error is low but validation error is high C) Both training and validation errors are low D) Only validation error is low
Answer: B
Explanation: Overfitting occurs when a model fits the training data well but generalizes poorly to new data (validation/test). A large gap between training and validation errors signals overfitting. Solutions: more training data, regularization (L1/L2), dropout, early stopping, ensemble methods.
Q36. When is AWS Glue DataBrew the right choice?
A) Complex ETL requiring custom code B) Visual data cleaning and transformation without code C) Real-time streaming data processing D) Model training
Answer: B
Explanation: AWS Glue DataBrew is a visual data preparation tool with 250+ pre-built transformations for cleaning and standardizing data without code. It is ideal for non-technical users to explore and prepare data.
Q37. Which feature engineering technique captures non-linear interactions between variables?
A) Applying scaling only B) Creating polynomial features or feature crosses C) One-hot encoding D) Applying PCA
Answer: B
Explanation: Polynomial features (x1^2, x1*x2, etc.) and feature crosses capture non-linear interactions between variables. Google's Wide and Deep Learning explicitly creates cross features. However, dimensionality grows rapidly, so care is needed.
Q38. What is the benefit of K-Fold cross-validation?
A) Faster training B) Uses all data for both training and validation, providing a more stable performance estimate C) Automated data augmentation D) Automatic hyperparameter tuning
Answer: B
Explanation: K-Fold cross-validation splits data into K folds and iterates K times, using each fold as the validation set once. All data participates in both training and validation, reducing high-variance estimation caused by a small validation set and providing a more reliable performance estimate.
Q39. Which sampling strategy is appropriate for imbalanced data?
A) Use all data with no weighting B) Stratified sampling to maintain class proportions C) Random sampling only D) Remove the minority class
Answer: B
Explanation: Stratified sampling preserves the original class proportions in each train/validation/test split. In sklearn use train_test_split(stratify=y). This ensures each set has a balanced class distribution, which is crucial for evaluating model performance on imbalanced data.
Q40. In SageMaker Clarify's post-training bias detection, what does DPPL (Difference in Positive Proportions in Predicted Labels) measure?
A) Difference in prediction accuracy B) Difference in the rate at which the model predicts positive labels across groups defined by a protected attribute C) Difference in number of model parameters D) Difference between training and validation errors
Answer: B
Explanation: DPPL measures the difference in the proportion of positive predictions across groups defined by a protected attribute (e.g., gender, age). A value close to 0 indicates a fairer model. A negative DPPL indicates bias against one group.
Modeling (Q41-Q58)
Q41. Which SageMaker XGBoost hyperparameters help prevent overfitting?
A) Increase num_round
B) alpha (L1), lambda (L2) regularization, subsample, colsample_bytree
C) Increase eta
D) Unlimited max_depth
Answer: B
Explanation: XGBoost regularization: alpha (L1 regularization) and lambda (L2 regularization) penalize model complexity. subsample (row sampling ratio) and colsample_bytree (column sampling ratio) increase diversity. Limiting max_depth, increasing min_child_weight, and using early_stopping_rounds also prevent overfitting.
Q42. What is the benefit of Bayesian optimization in SageMaker Hyperparameter Tuning Jobs?
A) Always slower than random search B) Efficiently explores promising hyperparameter combinations based on previous experiment results C) No difference D) More expensive
Answer: B
Explanation: Bayesian optimization intelligently selects the next hyperparameter combination to try based on prior experiment results. It finds good hyperparameters with fewer experiments than random or grid search, saving time and cost. SageMaker supports Bayesian, Random, and Hyperband strategies.
Q43. What characterizes SageMaker Autopilot?
A) Code is always required B) AutoML that automatically explores algorithms, feature preprocessing, and hyperparameters C) Supports only deep learning models D) Model explainability is not available
Answer: B
Explanation: SageMaker Autopilot is a fully managed AutoML service. It analyzes data, tries multiple algorithms (XGBoost, Linear, MLP, etc.) and feature transformations, and selects the best model. It provides generated notebook code for transparency and includes an Explainability Report.
Q44. Which SageMaker built-in algorithm is designed for time-series forecasting?
A) BlazingText B) DeepAR C) KNN D) PCA
Answer: B
Explanation: SageMaker DeepAR is an autoregressive recurrent neural network (ARNN) optimized for time-series forecasting. Training jointly on multiple related time series produces better forecasts than individual series. It also outputs probabilistic predictions (forecast distributions).
Q45. What is the general approach when fine-tuning a pre-trained image classification model with Transfer Learning?
A) Randomly initialize the entire model and train from scratch B) Freeze lower layers and train only the upper layers on the new dataset C) Apply the same strategy regardless of dataset size D) Transfer learning cannot be applied to images
Answer: B
Explanation: Common Transfer Learning approach: 1) Use a model pre-trained on ImageNet (VGG, ResNet, EfficientNet, etc.), 2) Freeze the lower feature-extraction layers, 3) Fine-tune only the upper task-specific layers (classification head) on the new dataset. Freeze more layers when data is scarce.
Q46. What are the two main approaches to distributed training in SageMaker?
A) Single-node, multi-core B) Data Parallelism and Model Parallelism C) Serial training, parallel training D) GPU training, CPU training
Answer: B
Explanation: Data Parallelism: copies the same model to multiple GPUs, each processes a different batch, then gradients are synchronized. Uses SageMaker Data Parallel Library. Model Parallelism: splits the model itself across multiple GPUs — used when a model doesn't fit on a single GPU. Uses SageMaker Model Parallel Library.
Q47. What are the main use cases for SageMaker BlazingText?
A) Image classification B) Word2Vec embedding training and text classification (supervised/unsupervised) C) Time-series forecasting D) Recommendation systems
Answer: B
Explanation: SageMaker BlazingText supports two modes: 1) Word2Vec mode: generates word embeddings via unsupervised learning (Skip-gram, CBOW), and 2) Text Classification mode: supervised classification of text. Similar to fastText, it processes large text datasets quickly.
Q48. For which task is the BLEU score used as an evaluation metric?
A) Binary classification B) Text generation tasks like machine translation and text summarization C) Regression D) Time-series forecasting
Answer: B
Explanation: BLEU (Bilingual Evaluation Understudy) evaluates machine translation quality by measuring n-gram overlap between generated text and reference translations. It is used to evaluate the SageMaker Seq2Seq algorithm (machine translation, text summarization).
Q49. Why would you use a custom training container (BYOC) in SageMaker?
A) To reduce cost B) To use libraries or algorithms not supported by SageMaker's built-in algorithms or frameworks C) For faster training D) For automatic distributed training
Answer: B
Explanation: BYOC (Bring Your Own Container) is used when you need an ML framework, custom algorithm, or specific library version not supported by SageMaker. Push a Docker image to ECR and use it in SageMaker. The image must conform to the SageMaker training/inference contract.
Q50. What does a lower Perplexity value mean for a language model?
A) The model is more uncertain B) The model predicts text better (lower is better) C) The model is smaller D) Training is faster
Answer: B
Explanation: Perplexity measures how well a language model predicts test data. Mathematically it is the exponent of the cross-entropy loss on test data. Lower perplexity means the model predicts the next word with more confidence — indicating a better language model.
Q51. What are the benefits and caveats of using Spot instances for SageMaker training?
A) Always more expensive B) Up to 90% cost savings but interruptions possible; checkpointing to S3 is required C) Faster training speed D) No additional configuration needed
Answer: B
Explanation: SageMaker Managed Spot Training can save up to 90% compared to On-Demand. However, Spot instances can be interrupted at any time, so checkpoints must be saved to S3 to support resumption after interruption. Set MaxWaitTimeInSeconds to control maximum wait time.
Q52. What is the input format for the SageMaker Object Detection algorithm?
A) CSV files B) RecordIO or augmented manifest format C) JPEG only D) TFRecord only
Answer: B
Explanation: SageMaker Object Detection (SSD/Faster RCNN-based) supports RecordIO-protobuf format and augmented manifest (JSON Lines with S3 image URLs + labels). Labels generated by SageMaker Ground Truth can be used directly.
Q53. Which approach is effective when training data is very limited?
A) Use complex deep learning models B) Transfer Learning, Data Augmentation, Few-shot Learning C) Train a model without data D) Remove regularization
Answer: B
Explanation: With limited data: 1) Transfer Learning — fine-tune a pre-trained model from a related domain, 2) Data Augmentation — expand the dataset by transforming existing data, 3) Few-shot Learning — learn new classes from a few examples, 4) Use pre-trained models from SageMaker JumpStart.
Q54. How do you determine the optimal K value for K-Means clustering?
A) Always use K=3 B) Elbow Method or Silhouette Score C) Use the dataset size as K D) Choose randomly
Answer: B
Explanation: Elbow Method: plot WCSS (within-cluster sum of squares) against K and pick the "elbow" point where the curve flattens. Silhouette Score: measures intra-cluster cohesion and inter-cluster separation to evaluate K. SageMaker K-Means can automatically try multiple K values.
Q55. What is the output of SageMaker's Semantic Segmentation algorithm?
A) Bounding box coordinates B) A class label for each pixel C) A single image label D) A text description
Answer: B
Explanation: Semantic Segmentation assigns each pixel of an image to a specific class (e.g., person, car, road). The output is a mask the same size as the input image, where each pixel value is a class ID. Widely used in autonomous driving and medical imaging.
Q56. What is the difference between Boosting and Bagging in ensemble learning?
A) No difference B) Boosting sequentially corrects prior model errors; Bagging averages results of independent models C) Bagging is slower D) Boosting is only for regression
Answer: B
Explanation: Bagging (Bootstrap Aggregating): trains independent models in parallel and averages results; reduces variance (Random Forest). Boosting: trains models sequentially, focusing more on samples misclassified by the prior model; reduces bias (XGBoost, AdaBoost, LightGBM). Boosting generally outperforms single models but has a higher overfitting risk.
Q57. What is the primary use case for SageMaker's LDA (Latent Dirichlet Allocation) algorithm?
A) Binary classification B) Topic modeling to discover hidden themes in text documents C) Image classification D) Numeric prediction
Answer: B
Explanation: LDA is an unsupervised algorithm that discovers latent topics in a document collection. Each document is represented as a mixture of topics, and each topic is a distribution over words. Applications include news categorization and content recommendation.
Q58. What is the benefit of using SageMaker Local Mode during training job development?
A) Handles large-scale datasets B) Fast code development and debugging (run SageMaker code locally) C) Automatic distributed training D) Production deployment
Answer: B
Explanation: SageMaker Local Mode runs training/inference code locally (or in SageMaker Studio) without starting actual SageMaker instances. Useful for fast iterative development and debugging. Requires Docker. Not appropriate for large-scale data or distributed training.
ML Implementation and Operations (Q59-Q65)
Q59. What is the difference between SageMaker real-time inference and async inference?
A) No difference B) Real-time returns responses immediately; async queues large/slow requests and stores results in S3 C) Async is faster D) Only real-time supports auto-scaling
Answer: B
Explanation: Real-time endpoints: low-latency requests requiring immediate responses. Async inference: queues requests stored in S3 and stores results in S3 — suitable for large payloads (up to 1 GB) or long-running processing. Batch Transform: processes large batches in a one-off job.
Q60. What issues can SageMaker Model Monitor detect?
A) Network latency only B) Data drift, model quality degradation, bias drift, and feature attribution changes C) Cost overruns only D) Code bugs only
Answer: B
Explanation: SageMaker Model Monitor has four monitor types: 1) Data Quality Monitor — detects statistical changes in input data, 2) Model Quality Monitor — detects degradation in prediction performance, 3) Bias Drift Monitor — detects changes in model bias, 4) Feature Attribution Drift Monitor — detects changes in feature importance.
Q61. Why is SageMaker Pipelines used?
A) To run a single model training job B) To automate and reproduce ML workflows (data processing → training → evaluation → deployment) C) Cost reduction only D) Data storage
Answer: B
Explanation: SageMaker Pipelines defines ML workflows as a DAG (Directed Acyclic Graph) and automates them. Pipeline steps (Processing, Training, Evaluation, RegisterModel, Deploy, etc.) can be chained with conditional execution, parameter passing, and experiment tracking. CI/CD integration enables MLOps.
Q62. How do you perform A/B testing on a SageMaker endpoint?
A) Create two separate endpoints B) Use Production Variants to specify traffic weights and serve multiple models simultaneously C) Route with a Lambda function D) Distribute via CloudFront
Answer: B
Explanation: SageMaker Endpoint Production Variants allows serving multiple model versions from a single endpoint. Assign traffic weights to each variant (e.g., 90% current model, 10% new model), compare performance metrics, then gradually shift traffic.
Q63. What is the purpose of SageMaker Neo?
A) Accelerate model training B) Compile and optimize models for specific hardware (edge devices, cloud instances) C) Data preprocessing D) Hyperparameter tuning
Answer: B
Explanation: SageMaker Neo compiles trained ML models for specific hardware targets (ARM, x86, NVIDIA GPU, Intel chips, etc.) using Apache TVM to reduce model size and increase inference speed. Particularly useful for IoT/edge device deployments.
Q64. What is the main cause of model performance degradation after deployment, and how should it be addressed?
A) Server errors; resolve by restarting B) Data drift (change in input data distribution); detect with Model Monitor, then retrain C) Network issues D) Code bugs
Answer: B
Explanation: The main cause of model degradation is data drift — when the distribution of production input data diverges from training data. SageMaker Model Monitor continuously monitors for drift, sends automatic alerts when drift is detected, and can trigger a retraining pipeline.
Q65. What is the ideal use case for SageMaker Serverless Inference?
A) Continuously high-traffic real-time services B) Intermittent traffic; no infrastructure cost when idle C) Large-scale batch processing D) Sub-millisecond latency requirements
Answer: B
Explanation: SageMaker Serverless Inference charges only for actual usage with zero infrastructure cost when idle. It is well-suited for intermittent or unpredictable traffic patterns. There is a cold-start latency, so it is not appropriate for strict latency requirements.
4. Exam Tips
- Deep Understanding of SageMaker Services: Clearly distinguish the purpose and differences of each SageMaker component.
- Built-in Algorithms: Memorize the input formats, use cases, and key hyperparameters for each algorithm.
- Kinesis Service Differences: Clearly understand Streams vs Firehose vs Analytics.
- Cost Optimization: Spot instances, Serverless Inference, Managed Spot Training.
- MLOps: Understand the flow of SageMaker Pipelines, Model Monitor, and Model Registry.
- Data Services: Know Glue, Lake Formation, Athena, and S3 partitioning strategies.
- Security: VPC, IAM roles, KMS encryption, and SageMaker network isolation.