概念 · SAA-C03 の発展
ECS, EKS and Batch for ML workloads
Run training or inference containers on ECS, EKS or Batch, with GPUs and the right roles.
このレッスンはまだ翻訳されていないため、英語で表示しています。
Solutions Architect Associateで学んだこと
- Amazon ECS is the simplest AWS container service, and Amazon EKS is managed Kubernetes.
- EKS pods get their own AWS permissions through IAM roles for service accounts or EKS Pod Identity.
Amazon ECS
- GPU
- EC2 nodes with GPU AMI
- Code permissions
- Task role
- Pick it when
- Simple container serving
Amazon EKS
- GPU
- NVIDIA device plugin
- Code permissions
- IRSA or Pod Identity
- Pick it when
- Kubernetes is the standard
AWS Batch
- GPU
- GPU in job definition
- Code permissions
- Job role
- Pick it when
- Queued offline jobs
SageMaker AI
- GPU
- Pick a GPU instance
- Code permissions
- Execution role
- Pick it when
- Managed MLOps features
| Option | GPU | Code permissions | Pick it when |
|---|---|---|---|
| Amazon ECS | EC2 nodes with GPU AMI | Task role | Simple container serving |
| Amazon EKS | NVIDIA device plugin | IRSA or Pod Identity | Kubernetes is the standard |
| AWS Batch | GPU in job definition | Job role | Queued offline jobs |
| SageMaker AI | Pick a GPU instance | Execution role | Managed MLOps features |
1 / 2
Amazon ECS
- GPU
- EC2 nodes with GPU AMI
- Code permissions
- Task role
- Pick it when
- Simple container serving
Amazon EKS
- GPU
- NVIDIA device plugin
- Code permissions
- IRSA or Pod Identity
- Pick it when
- Kubernetes is the standard
AWS Batch
- GPU
- GPU in job definition
- Code permissions
- Job role
- Pick it when
- Queued offline jobs
| Option | GPU | Code permissions | Pick it when |
|---|---|---|---|
| Amazon ECS | EC2 nodes with GPU AMI | Task role | Simple container serving |
| Amazon EKS | NVIDIA device plugin | IRSA or Pod Identity | Kubernetes is the standard |
| AWS Batch | GPU in job definition | Job role | Queued offline jobs |
2 / 2
SageMaker AI
- GPU
- Pick a GPU instance
- Code permissions
- Execution role
- Pick it when
- Managed MLOps features
| Option | GPU | Code permissions | Pick it when |
|---|---|---|---|
| SageMaker AI | Pick a GPU instance | Execution role | Managed MLOps features |
- 1You submit jobs that name an image and resources.
- 2The queue holds them by priority.
- 3The compute environment starts GPU or Spot instances, and the results go to S3.
概要
For GPU work, run on EC2 nodes, because Fargate has no GPU. On Amazon ECS, use an ECS-optimized GPU AMI and request GPUs in the task definition resource requirements. On Amazon EKS, use GPU nodes with the NVIDIA device plugin and request nvidia.com/gpu in the pod. For AWS silicon, the Neuron device plugin exposes Inferentia and Trainium. Give the code its own role: the task role on ECS, IRSA or Pod Identity on EKS. The ECS task execution role only pulls images and writes logs.
概要
AWS Batch is for queued jobs such as training, scoring or embedding generation. A job definition names the image, vCPUs, memory and GPUs. Jobs wait in a job queue and a compute environment starts EC2, Spot or Fargate capacity, then scales back to zero. Batch has no endpoint, so it fits offline work.
Choose these over SageMaker AI when the team already runs a container platform, needs a custom serving stack or wants to share GPUs with other workloads. Choose SageMaker AI when you want managed endpoints, auto scaling, Model Registry and Model Monitor without building them.
覚えること
- No GPU on Fargate. Use EC2 nodes for ECS and EKS.
- ECS: GPU AMI and GPU in the task definition. EKS: NVIDIA device plugin and nvidia.com/gpu.
- Own permissions: ECS task role, or IRSA and Pod Identity on EKS.
- Batch: job definition, job queue, compute environment. Spot cuts cost.
- Pick SageMaker AI when you want the managed MLOps features.
試験では
- “Containers need GPUs on Amazon ECS” points to EC2 launch type with a GPU instance, not Fargate.
- “Each pod needs different AWS permissions” points to IRSA or EKS Pod Identity.
- “Thousands of containerized scoring jobs at lowest cost” points to AWS Batch on Spot.
- “Team already standardizes on Kubernetes for serving” points to Amazon EKS.
このタスクの内容 · 3.2
- Provisioned vs on-demand resources
- IaC for ML: CloudFormation, CDK and Service Catalog
- Containers for ML: images, ECR and own containers
- ECS, EKS and Batch for ML workloads
- SageMaker endpoints in a VPC
- Auto scaling endpoints and choosing metrics
- Scaling GPU and LLM workloads
Knowledge Bases
- Retrieval pipelines
- Agent state and memory management
- Agentic workflow infrastructure