Amazon MLA-C01: Data Engineering and Feature Engineering — Study Guide

Part of the AWS Machine Learning Engineer Associate MLA-C01 — Study Guide. Practice with verified answers in the Amazon exam hub, or take timed practice tests on ExamRoll.io.

Core concept

Data engineering for ML is about producing reproducible, auditable inputs to model training and inference while minimizing leakage and operational burden. At the core are consistent ingestion semantics (event time, record identifier, schema), a canonical metadata catalog, and well-defined transforms that can be executed both offline for model training and online for real-time inference. Architect your pipelines so the same transformation code (or the same Feature Store record definitions) backs training datasets and the online features returned at inference time; this avoids train/serve skew. For temporal problems, preserve the event time for each record and enforce time-aware joins and splits to prevent label leakage; when using SageMaker Feature Store, set a RecordIdentifierFeatureName and an EventTimeFeatureName in CreateFeatureGroup so downstream training and inference use identical keys.

Feature engineering splits into deterministic, repeatable transformations and exploratory transforms. Deterministic transforms include imputation, scaling, categorical encoding, and derived aggregations (rolling counts, time-window features). Execute these as code that can run in Glue ETL, SageMaker Processing, or SageMaker Data Wrangler and be checkpointed into an offline store. For high-cardinality categorical features prefer target encoding with cross-validation folds or frequency/embedding-based representations rather than naive one-hot encoding to avoid combinatorial explosion. For numerical features, prefer pipeline-friendly standardization (mean/variance) or quantile transforms stored as parameters in a model artifact so production normalization matches training.

Key services and configuration

AWS Glue provides the canonical ETL and metadata layer for many ML pipelines. Use Glue Crawlers to populate the Glue Data Catalog for S3 and JDBC sources, then author Spark-based Glue ETL jobs or Glue Studio visual jobs to clean and transform data. Configure Glue jobs with GlueVersion (for example 3.0), WorkerType (G.1X, G.2X), NumberOfWorkers, JobBookmarks for incremental processing, and DefaultArguments such as “–additional-python-modules” to include libraries like awswrangler or pydeequ. For ingestion from on-prem MySQL, establish a Glue connection with JDBC URL and use either Glue jobs or AWS DMS to capture CDC to an S3 landing zone; when using DMS, select full-load then CDC and target S3 parquet for efficient offline features.

SageMaker Feature Store is the central feature management option for low operational overhead at scale. CreateFeatureGroup requires FeatureDefinitions, RecordIdentifierFeatureName, EventTimeFeatureName, OnlineStoreConfig (EnableOnlineStore=True to enable a DynamoDB-backed low-latency store), and OfflineStoreConfig with S3Uri and DataCatalogConfig to expose offline features via Athena/Glue. Ingest with BatchPutRecord or PutRecord depending on throughput; include FeatureGroupArn and RoleArn that grants the service PutRecord permissions. The offline store persists Parquet files in S3 and integrates with the Glue Data Catalog automatically, enabling reproducible training queries. For real-time features, use GetRecord against the online store; for bulk training joins prefer the offline S3 Parquet path.

For model governance and deployment workflows, use SageMaker Model Registry and SageMaker Pipelines. Register trained models with CreateModelPackage or the Pipelines RegisterModel step and set ModelApprovalStatus to “PendingManualApproval” to enforce a manual approval gate. Integrate Pipelines with AWS CodePipeline or add a custom Lambda that transitions model_package versions via UpdateModelPackage to “Approved” when authorized. For drift and bias monitoring, combine SageMaker Clarify for bias/baseline analysis and SageMaker Model Monitor for continuous data/label drift detection. Use ClarifyProcessor (sagemaker.processing.ProcessingJob) for on-demand bias assessment by pointing it at the offline store Parquet artifacts or streaming samples collected by Model Monitor.

Design patterns and trade-offs

Choose offline-first architectures when training throughput and complex joins matter: aggregate and persist large windowed features into S3 Parquet (Glue/EMR/Glue Spark jobs), catalog them in Glue Data Catalog, and version datasets with S3 prefixes and object-versioning. This approach favors reproducibility and cost-effective storage, but increases latency for serving fresh features. When low-latency features are required, mirror a subset to Feature Store Online (DynamoDB) or a caching layer; the trade-off is operational overhead to keep online and offline stores consistent. Use Feature Store’s built-in BatchPutRecord pipelines or stream ingestion via Kinesis Data Streams + Lambda that writes to Feature Store to achieve near-real-time updates while still maintaining an offline canonical view.

For iterative experimentation vs production throughput, SageMaker Pipelines with caching provides a notable win: enable CacheConfig in pipeline steps so compute-intensive transformations and even training steps are skipped when their inputs (parameters, data checksums) haven’t changed. This reduces startup latency for consecutive runs compared with repeatedly provisioning identical compute. For extremely low-latency inference you will trade off cost and complexity: multi-model endpoints or provisioned concurrency reduce cold-start variability but increase cost; using Feature Store online plus a lightweight model container minimizes per-request orchestration.

Algorithm and preprocessing choices present trade-offs: built-in XGBoost excels for tabular fraud tasks and provides scale_pos_weight to address class imbalance without resampling, which is operationally light. However, deep models with embeddings handle high-cardinality categorical variables more gracefully but require more infrastructure and feature pipelines. Use automated transforms where possible: SageMaker Data Wrangler and Glue DataBrew provide visual, repeatable transforms (imputation, normalization, resampling) and can export flows to scripts or to Feature Store, reducing engineering time.

Common pitfalls and decision criteria

A frequent mistake is not aligning train and serve transformations. Store transformation parameters (scalers, encoders) with the model or in Feature Store so online preprocessing is identical to training. Another pitfall is one-hot encoding high-cardinality categories causing excessive feature dimensionality; prefer embeddings, hashing, or target-frequency encodings and validate those via cross-validated leakage-safe procedures. Security mistakes are also common: when training on sensitive S3 data, enforce SSE-KMS (KmsKeyId), restrict access with S3 bucket policies and IAM roles (sagemaker.amazonaws.com principal) and place training jobs in a VPC with S3 VPC Gateway endpoints so data does not traverse the public internet.

Decide between Glue job-driven ETL versus SageMaker Processing/Data Wrangler by evaluating frequency and complexity: Glue is optimized for scheduled, scalable Spark ETL across many sources and integrates with Glue Data Catalog; Data Wrangler and SageMaker Processing are suited for rapid experimentation and direct export to Feature Store or training jobs. For anomaly detection, use Amazon Lookout for Metrics for automatic statistical anomaly detection on time series without heavy ML ops, but select Deequ running in Glue for customizable, lineage-aware data-quality checks that can feed metrics into dashboards.

Practical Problem: Use-Case Scenario

Named company: FinEdge

FinEdge is building a fraud detection service that must train models from daily batch transaction logs in Amazon S3 plus customer profiles stored in an on-prem MySQL. The data must remain encrypted and isolated; model versions require manual approval before production deployment; models must have on-demand bias and drift assessment; inference needs low-latency feature lookup.

  1. Ingest and centralize: Use AWS DMS to perform an initial full load and CDC replication from the on-prem MySQL into an S3 landing zone as Parquet files. Configure DMS with S3 target settings and ensure SSL for the JDBC source. Use a Glue Crawler to register both the S3 transaction logs and the DMS-parquet customer profiles in the Glue Data Catalog. Set Glue job parameters: GlueVersion 3.0, WorkerType G.2X, NumberOfWorkers suited to daily volume, and enable JobBookmarks for incremental runs.

  2. Feature engineering and storage: Author Spark transforms in Glue or use SageMaker Data Wrangler for interactive feature iterations and export. Persist deterministic aggregated features to S3 as Parquet and create a SageMaker Feature Store FeatureGroup with CreateFeatureGroup specifying FeatureDefinitions, RecordIdentifierFeatureName=“transaction_id”, EventTimeFeatureName=“event_time”, OnlineStoreConfig with EnableOnlineStore=True, and OfflineStoreConfig S3Uri pointing to the canonical data lake and DataCatalogConfig to link the Glue table. Ingest via BatchPutRecord for bulk loads and PutRecord for transactional updates.

  3. Training and model registry: Use SageMaker Pipelines for preprocessing, training, and registration. Include a RegisterModel step that registers the model into a ModelPackageGroupName and sets ModelApprovalStatus=“PendingManualApproval”. Hook an AWS CodePipeline manual approval action or use the SageMaker API UpdateModelPackage to move approved packages to “Approved”. For class imbalance, set XGBoost hyperparameter “scale_pos_weight” based on class ratio computed in baseline statistics to avoid resampling complexity.

  4. Governance, monitoring, and on-demand checks: Create baselines with SageMaker Clarify using a ClarifyProcessor to compute bias metrics and save baselines to S3/FeatureStore offline. Deploy Model Monitor with CreateMonitoringSchedule for data/feature drift; for on-demand bias or drift assessment, run a ClarifyProcessor or StartMonitoringSchedule programmatically to analyze recent captured traffic or the online store snapshot. Store monitoring outputs to S3 and surface anomalies via QuickSight dashboards. Secure S3 using SSE-KMS, restrict access by IAM roles with least privilege, and place training and inference in a VPC with S3 VPC endpoint.

AWS rationale: This approach uses Glue and DMS for scalable, auditable ingestion and metadata via the Glue Data Catalog; SageMaker Feature Store for consistent online/offline features and low-latency lookups; SageMaker Pipelines and Model Registry to control model lifecycle with minimal operational overhead and built-in support for manual approval; Clarify and Model Monitor to provide on-demand and continuous bias/drift analysis. The combination preserves encrypted isolation (SSE-KMS, VPC endpoints), reduces engineering work by using managed services for ingestion and feature management, and enforces reproducible, auditable ML artifacts.


All domains · Model Training and Hyperparameter Optimization

Practice these questions → · Timed practice on ExamRoll.io →

Pass the whole exam — not just this question

You found this answer. Get every verified question and explanation in one place, and save hours of prep. Free to start.

Pass your exam →

Browse Amazon →

Related guides

All-in-one access

One subscription. Every exam.

Every plan unlocks unlimited answer search, practice tests, AI explanations, and the full resource library — in 20+ languages.

Monthly
24.87
Just €0.83/day
Everything included:
  • Unlimited answer search
  • Unlimited practice tests
  • AI-powered explanations
  • Full resource library
  • 20+ languages
  • Weekly content updates
  • Rewards & referrals
  • Priority support
Start free trial

No credit card required*

Best value
12 months
179.87
Just €0.49/daySave 40%
Everything included:
  • Unlimited answer search
  • Unlimited practice tests
  • AI-powered explanations
  • Full resource library
  • 20+ languages
  • Weekly content updates
  • Rewards & referrals
  • Priority support
Start free trial

No credit card required*

✓ Free plan included · ✓ Cancel anytime · ✓ All plans unlock the full product