Compute and containers: EC2, Lambda, ECR/ECS/EKS

Lesson 3 of 4 in The Supporting Cast: Data, Compute, and Pipes.

Most of the time SageMaker AI and Bedrock hide the compute, but the exam still expects you to know the raw materials. On EC2, learn the GPU families conceptually (chip specs are not tested): the P family carries training-grade GPUs — large memory, fast interconnects for multi-GPU and multi-node jobs; the G family leans toward inference and lighter training at friendlier cost; and AWS's own silicon splits by direction — Trn (Trainium) instances for training, Inf (Inferentia) instances for inference. When SageMaker runs a job or an endpoint, these same families are what it manages for you.

Compute and containers — where ML workloads touch each
ServiceWhat it isWhen ML touches it

Amazon EC2

Raw instances, including the GPU families (P = training, G = inference-leaning, Trn/Inf = AWS silicon)

Self-managed training or serving when you need total control — and the substrate SageMaker manages under its jobs and endpoints

AWS Lambda

Serverless functions, scaling to zero

Event glue: light preprocessing, invoking endpoints, small CPU inference — bounded by its timeout and memory ceilings, and no GPUs

AWS Batch

Managed batch job queues over containers

Scheduled, queue-driven jobs — feature builds, scoring sweeps, even GPU jobs — without owning a cluster

Amazon ECR

The container registry

Where SageMaker pulls training and inference images; custom containers live here

Amazon ECS

AWS-native container orchestration (including serverless Fargate capacity)

Serving lightweight model APIs and the microservices around a model

Amazon EKS

Managed Kubernetes

Teams running their ML platform on Kubernetes (Kubeflow, Ray) or operating large self-managed GPU fleets

The container thread ties it together: even fully managed SageMaker training runs a container — one of AWS's built-in images or your own pushed to ECR. That is why ECR appears in answers about custom frameworks: the "bring your own" path on SageMaker means bring your own image.

Interactive sorting exercise: Sort each scenario onto the compute service the exam wants.

Interactive checkpoint quiz (2 questions) — open this page in a browser to take it.