Data Preparation for ML and AI
Collecting, storing, transforming and checking the data that models learn from, including data for foundation models and RAG.
1.1Task
Collect and store data.
You should be able to: Bring data into AWS and store it in the right place and format: storage, streaming, databases, vector stores and feature stores.
1.1Task
Collect and store data.
You should be able to: Bring data into AWS and store it in the right place and format: storage, streaming, databases, vector stores and feature stores.
- S3 as the ML data lakeLay out buckets and prefixes by stage, partition, version, tier and trigger from S3 events.Builds on SAA-C03
- Choosing storage: S3, EFS, EBS, FSx and transfer toolsPick the store for ML data by structure, access pattern, throughput, cost and residency.Builds on SAA-C03
- Extracting data from databases and searchPick the extract path from a source by size, freshness and the load it puts on production.Builds on SAA-C03
- Data formats: Parquet, ORC, Avro, CSV, JSON, RecordIOPick a format by how the data is read: whole rows or a few columns, and which tool reads it.Builds on SAA-C03
1.1 Collect and store data.
Amazon Kinesis Data StreamsReal-time streams sized in shards: limits, fan-out, and fixing throttling and lag.Builds on SAA-C03
Amazon Data FirehoseBuffered delivery to S3, Redshift and OpenSearch: buffering, transforms, conversion, partitioning.Builds on SAA-C03
Amazon Managed Service for Apache FlinkManaged Apache Flink: stateful windows and joins over live streams from Kinesis or Kafka.
Amazon Managed Streaming for Apache Kafka (Amazon MSK)Managed Kafka for ML ingestion: cluster types, MSK Connect, and the Kafka or Kinesis choice.Builds on SAA-C03
- Troubleshooting ingestion and storage capacityRead the throttling sign at each layer, then retry, spread the load or raise the limit.Builds on SAA-C03
AWS Glue Data Catalog and AWS Lake FormationOne catalog of tables for every engine, and Lake Formation permissions down to columns and rows.Builds on SAA-C03
1.1 Collect and store data.
- Merging data from multiple sourcesJoin and union data from several sources: clean the keys first, pick the tool by size.
- Choosing and configuring a vector storePick the vector store by scale, latency, cost, filtering and the stack you already run.Builds on AIF-C01
Amazon OpenSearch ServiceSet up k-NN: index fields, HNSW or IVF, engines, metrics, serverless or domain, hybrid queries.Builds on AIF-C01
- Aurora and RDS PostgreSQL with pgvectorVectors in PostgreSQL: column, HNSW or IVFFlat index, distance operators, one query with filters.Builds on AIF-C01
- Ingesting text, image, audio and videoStore media in S3 with metadata, and turn it into text, labels and features with the right service.
- Ingesting data into SageMaker Feature StorePutRecord, SDK, Spark and Data Wrangler ingestion, and what reaches the online and offline stores.Builds on AIF-C01
1.2Task
Perform data transformation, feature engineering, and pre-processing.
You should be able to: Turn raw data into model-ready features: transform, scale, encode, embed, chunk, mask and prepare data for foundation models.
1.2Task
Perform data transformation, feature engineering, and pre-processing.
You should be able to: Turn raw data into model-ready features: transform, scale, encode, embed, chunk, mask and prepare data for foundation models.
1.2 Perform data transformation, feature engineering, and pre-processing.
Amazon EMRRun Spark on EMR on EC2, Serverless or EKS, with Spot task nodes, and choose EMR or Glue.Builds on SAA-C03
Amazon SageMaker Data WranglerVisual data preparation inside SageMaker Canvas: import, transform, analyze and export.
Amazon SageMaker ProcessingRun a script or container on managed instances for preprocessing, evaluation and bias jobs.
Amazon AthenaUse CTAS and INSERT INTO to convert and partition data, with projection, workgroups and Iceberg.Builds on SAA-C03
Amazon SageMaker Feature StoreFeature groups, online and offline stores, point-in-time joins and sharing for consistent ML features.Builds on AIF-C01
- Transforming streaming dataLambda settings for streams, Spark Structured Streaming and Flink, and windowed features.Builds on SAA-C03
1.2 Perform data transformation, feature engineering, and pre-processing.
- Feature engineering techniquesScale, encode, split and reduce features, and know which algorithms care about scale.Builds on AIF-C01
- Embedding models for text and imageChoose and use Titan, Cohere or SageMaker embedding models, with matching dimensions and one model for index and query.Builds on AIF-C01
- Text pre-processing and tokenizationClean text, pick stemming or lemmatization, choose word or subword tokens, and augment domain text.Builds on AIF-C01
- Preparing documents for RAGChunking strategies, parsing, and metadata so a knowledge base retrieves the right passage.Builds on AIF-C01
- Masking, redaction and anonymizationFind personal data with Comprehend and Macie, and mask, hash or generalize it before use.Builds on AIF-C01
- Data for fine-tuning, continued pre-training and distillationJSONL formats for fine-tuning, continued pre-training and distillation, and how to split and store them.Builds on AIF-C01
1.3Task
Validate data quality and manage bias.
You should be able to: Check that data is clean, correct and fair: quality rules, labels, bias metrics, class balance and training-data integrity.
1.3Task
Validate data quality and manage bias.
You should be able to: Check that data is clean, correct and fair: quality rules, labels, bias metrics, class balance and training-data integrity.
AWS Glue Data QualityDQDL rules, recommendations, scores and alerts that check tables and ETL data.
Amazon SageMaker Ground TruthWorkforces, labeling jobs, automated labeling and consolidation in Ground Truth, now closed to new customers.Builds on AIF-C01
- Sources of bias in training dataSelection, sampling, measurement and label bias, leakage, and splitting that keeps tests honest.Builds on AIF-C01
Amazon SageMaker ClarifyPre-training bias metrics, facet and label setup, and how to read the report. Closed to new customers.Builds on AIF-C01
1.3 Validate data quality and manage bias.
- Class imbalance and data augmentationBalance rare classes with resampling, SMOTE, weights and augmentation, and judge with F1 or PR AUC.
- Validating AI training data integrityCheck prompt-response pairs, screen content and PII, and guard against poisoning and noisy labels.
- Cleaning data: outliers, missing values, duplicatesDetect outliers, impute missing values, remove duplicates and fix types with Glue, DataBrew, Data Wrangler or Spark.