AWS AI and ML Services

Overview

AWS provides a layered AI/ML stack — from fully managed AI services (no ML knowledge needed) through SageMaker (full ML lifecycle control) to Bedrock (managed foundation model access). This page synthesizes the key services and decision points for the AWS AI Practitioner (AIP-C01) certification.


Amazon SageMaker

Full ML lifecycle platform for building, training, and deploying custom models.

Training

  • Hyperparameter tuning — automatic optimization under SageMaker model training
  • Warm start — reuse previous tuning jobs as starting points
  • EnableNetworkIsolation=true blocks internet access during training
  • Input modes:
    • File mode — copies entire dataset from S3 before training (slower for large data)
    • Fast File mode — streams data directly from S3 on demand
    • FSx for Lustre — high-performance reads for large datasets

Key Components

ComponentPurpose
CanvasNo-code ML model building with visualization (#nocode)
JumpStartPretrained open-source models for quick starts (#nocode)
Data WranglerData preparation and transformation (now Canvas)
DeepARTime-series forecasting using RNNs
Model RegistryCentralized model catalog
Model CardsDocument model characteristics
ClarifyDetect bias in data
Model MonitorContinuous monitoring for drift; baseline from training data

Inference/Deployment Options

TypeLatencyMax SizeUse Case
Real-time endpointsSub-millisecond25 MBContinuous low-latency inference
Asynchronous endpointsUp to 15 min1 GBLong-running workloads, GPU-supported
Serverless inferenceAuto-scalingVariable traffic, no GPU
Batch transformOfflineLarge batchesOffline processing, results stored in S3
  • Multi-model endpoints deploy multiple models on a single endpoint
  • Can combine with Lambda, Bedrock provisioned throughput, or hybrid solutions

Amazon Bedrock

Fully managed, serverless access to third-party foundation models for generative AI.

Key Features

  • On-demand API access to foundation models
  • Import models trained/fine-tuned in SageMaker
  • Cross-Region Inference for model availability
  • Bedrock Data Automation (BDA) — process documents, images, video, audio
  • Bedrock AgentCore — build, deploy, and operate agents at scale
  • Knowledge Bases — managed RAG implementation
  • Streaming support via BedrockRuntimeClient for real-time feedback

Bedrock KB RAG vs Kendra-based RAG

  • Bedrock Knowledge Bases: vector-based retrieval integrated with foundation models
  • Kendra: managed semantic search using NLP (non-vector, contextual ranking)

Other AI Services

ServicePurpose
ComprehendNLP — key phrases, sentiment, entities, PII detection
Comprehend MedicalDetect PHI in medical text
MacieDiscover/protect PII in S3 using ML
TranscribeSpeech-to-text with auto data masking
TranslateLanguage translation
TextractImage/document to text (OCR)
LexChatbot building
PollyText-to-speech
KendraSemantic search with NLP and GenAI Index
QuickSightBI dashboards with ML insights
PinpointMarketing communications (email, SMS, push)

Agent Frameworks

  • Strands Agents — SDK for autonomous AI agents
  • Agent Squad — multi-agent orchestration

ML Concepts and Techniques

Fine-Tuning

  • LoRA (Low-Rank Adaptation) — parameter-efficient fine-tuning with small trainable matrices
  • Full fine-tuning — adjusts all parameters, better performance but more resources

Model Optimization

  • Quantization — reduce numerical precision of weights/activations
  • Pruning — remove unnecessary weights or neurons
  • Knowledge distillation — transfer from large teacher to small student model

Search and Retrieval

  • k-NN — exact nearest neighbor, computationally intensive, best for small datasets
  • ANN (Approximate Nearest Neighbor) — HNSW algorithm, fast with near-optimal accuracy for large vector DBs

Evaluation

  • LLM-as-a-judge — use one model to evaluate another’s outputs (bias, toxicity, guideline adherence)

Patterns

  • ReAct — alternate between reasoning and taking actions
  • Chain of Thought (CoT) — step-by-step reasoning
  • Circuit Breaker — temporarily block access to faulty service after failures
  • Exponential backoff with jitter — intelligent retry spacing adapting to system stress
  • Recursive summarization — progressively condense long content

Data Techniques

  • Data augmentation: rotation, flipping, scaling
  • SMOTE: synthetic minority oversampling for imbalanced datasets
  • L2 regularization (ridge regression): prevent overfitting
  • Embedding drift: monitor when embedding model changes

Infrastructure Decision Points

Compute Location

OptionUse Case
RegionStandard workloads
Local ZonesLow-latency near population centers
Wavelength5G mobile edge computing
OutpostsOn-premises AWS infrastructure
SnowballLarge data migration

Networking

  • PrivateLink — one-way VPC-to-VPC connection
  • Transit Gateway — hub connecting multiple VPCs and on-premises
  • Direct Connect — dedicated on-premises to AWS connection
  • Site-to-Site VPN — encrypted tunnel (e.g., for Glue)

Data and Integration

  • Lake Formation — centralized data governance for analytics/ML
  • Glue — ETL, PII detection in pipelines, Data Catalog
  • AppFlow — SaaS-to-AWS data synchronization
  • EventBridge — complex event routing (vs SQS for simple queuing)
  • Step Functions with Dynamic Choice — visual routing for document processing

Security

  • SSE-KMS vs SSE-S3 — KMS provides more logs and fine-grained control
  • Verified Permissions — fine-grained authorization service
  • CloudWatch Anomaly Detection — detect token burst patterns in Bedrock apps
  • API Gateway Request Validators — validate size and fields


Source References

  • AIP C01 Prepare Notes