AWS ML Engineer Associate cheat sheet
AWS ML Engineer Associate · Keep the key ideas within reach.
Data Preparation for Machine Learning
SageMaker Data Wrangler exports a flow as a .flow file plus a processing job; it can emit Pandas code, PySpark code, or a SageMaker Pipeline step.
SageMaker Processing jobs run a container with input channels mounted at /opt/ml/processing/input and outputs written to /opt/ml/processing/output; the OutputPath in S3 receives the artifacts.
SageMaker Feature Store groups features into feature groups; each feature group has a record identifier name and an event time feature name, and OnlineStore and OfflineStore are configured independently.
Offline store writes are backed by S3 and queried via Athena or Glue; online store serves low-latency GetRecord calls for real-time inference.
SageMaker Ground Truth labeling jobs require an input manifest (.json or .jsonl), a task type, and a workforce; output goes to an S3 prefix with an augmented manifest for training.
Bias detection with SageMaker Clarify reports metrics such as Class Imbalance (CI), Difference in Proportions of Labels (DPL), and Label Quality (for binary or multiclass facets).
SageMaker Clarify pre-training bias metrics require a facets file or column specifying the sensitive group; post-training metrics require model predictions on a test dataset.
Amazon SageMaker Data Wrangler bias report and quick model are built-in analyses; the Data Quality and Insights Report detects missing values, duplicates, and target leakage.
ML Model Development
SageMaker built-in algorithms: XGBoost (tabular), Linear Learner (regression/classification), K-Nearest Neighbors, K-Means, DeepAR (time series), BlazingText (text), Image Classification, Object Detection, Seq2Seq, and Factorization Machines.
Automatic Model Tuning (hyperparameter tuning) requires an objective metric name and type (Maximize or Minimize), plus ranges for continuous/integer/categorical hyperparameters; it uses Bayesian optimization by default.
SageMaker Training jobs accept hyperparameters, input channels, an output path, and an IAM role; distributed training modes include data parallel and model parallel.
SageMaker Debugger captures tensors and saves them to S3; rules such as vanishing_gradient, overfit, and loss_not_decreasing emit findings that can stop training early.
SageMaker Experiments track runs, trials, and trial components; each trial component records hyperparameters, metrics, and artifacts.
SageMaker Autopilot generates candidate pipelines and produces a notebook with the preprocessing and model code; it can be run in Ensembling or HyperparameterTuning mode.
The SageMaker Python SDK Estimator's .fit() launches a training job; .deploy() creates an endpoint; the model artifact is stored as model.tar.gz in S3.
SageMaker JumpStart provides pre-trained foundation models and task-specific models; you can fine-tune or deploy them directly via the console or SDK.
Deployment and Orchestration of ML Workflows
SageMaker real-time endpoints require a model artifact plus an inference container; the endpoint auto-scales via Application Auto Scaling policies on the InvocationsPerInstance metric.
SageMaker Serverless Inference has a configurable MemorySizeInMB and MaxConcurrency, and scales to zero; it suits intermittent traffic, not sustained high throughput.
SageMaker Asynchronous Inference queues requests to S3 and returns results to S3, allowing long-running inference (up to 15 minutes) and zero-instance scaling.
SageMaker Batch Transform runs a job over an S3 input, writes predictions to S3, and tears down the cluster; it does not require an endpoint.
SageMaker Pipelines compose steps: Processing, Training, Tuning, Transform, Condition, and RegisterModel; the pipeline definition is a DAG stored as a JSON pipeline definition.
SageMaker Model Registry stores model packages with a ModelPackageGroupName and version; approval status (PendingManualApproval, Approved, Rejected) gates deployment.
SageMaker Projects use MLOps templates (e.g., model build, model deploy) that provision CodeCommit, CodePipeline, and CodeBuild for CI/CD.
Multi-model endpoints host many models behind one endpoint and load them on demand from S3; multi-container endpoints host up to 15 containers per endpoint.
ML Solution Monitoring, Maintenance, and Security
SageMaker Model Monitor runs four monitor types: data quality, model quality, bias drift, and feature attribution drift; each requires a baseline generated from a training or reference dataset.
Data quality monitoring uses statistics and constraints (from the baseline) and reports violations via CloudWatch metrics and the MonitoringExecutionStatus.
Model quality monitoring requires ground-truth labels merged with predictions; it computes metrics such as accuracy, F1, and RMSE against the baseline.
SageMaker Clarify integrates with Model Monitor to detect bias drift and feature attribution drift using SHAP values.
Endpoints support data capture to S3 (DataCaptureConfig) at a specified sampling percentage; captured data feeds Model Monitor and retraining.
IAM execution roles for training and hosting need s3:GetObject/PutObject on the relevant buckets, plus ecr:GetAuthorizationToken and ECR pull permissions for custom images.
SageMaker supports VPC-only mode (EnableNetworkIsolation) for training and hosting; when enabled, containers cannot make outbound internet calls, requiring VPC endpoints for S3 and ECR.
Encryption at rest uses AWS KMS keys for S3 input/output, EBS volumes attached to training instances, and the endpoint; inter-container traffic encryption can be enabled on the endpoint.