AWS ML Engineer Associate study materials
AWS ML Engineer Associate study resources

AWS ML Engineer Associate: Data Preparation for Machine Learning

AWS ML Engineer Associate · Work through your exam, one topic at a time.

All guide sections

Data Preparation for Machine Learning

Where data work happens

On AWS, preparation spans three layers: storage (S3 as the source of truth), catalog and query (AWS Glue Data Catalog, Athena, Lake Formation permissions), and processing (Glue ETL jobs, SageMaker Processing, SageMaker Data Wrangler, EMR for Spark at scale). Know which tool fits which constraint: Data Wrangler for interactive exploration and export to a pipeline; Glue for serverless Spark and catalog maintenance; SageMaker Processing for containerized, repeatable transforms that sit inside a pipeline step.

Feature engineering and the Feature Store

SageMaker Feature Store has an online store (low-latency reads for real-time inference) and an offline store (S3-backed, for training and batch scoring). A feature group is defined by a record identifier plus an event-time feature; the event time is what makes point-in-time joins correct so training data does not leak future values. Traps: assuming the online store is queryable for training, or forgetting that ingestion requires the record identifier name to match the feature group definition.

Splitting, imbalance, and bias

Use stratified splits for classification, split by entity (customer, device) when rows are correlated, and split by time for temporal data. Handle class imbalance with resampling or class weights rather than accuracy-based evaluation. SageMaker Clarify runs bias detection (pre-training metrics on data, post-training metrics on predictions) and explainability via SHAP. Trap: treating Clarify as a monitoring-only service.

Worked example

A team trains a churn model on monthly snapshots. Rule of thumb: join each label to features using the label's event time, never the latest feature value. Implement this with a Feature Store offline-store query bounded by event time, then split by customer ID and by month so no customer or future month appears in training.

Data quality and governance

Lake Formation grants column- and row-level access; Glue DataBrew profiles and cleans data with a visual interface; Deequ-style constraint checks belong in pipeline steps that fail loudly before training.