Main Concept

Amazon EC2 provides virtual servers in the cloud. For most AI/ML workloads on AWS, managed services like SageMaker or Amazon Bedrock are preferred — but EC2 becomes relevant for AI when you need direct control over the underlying hardware, especially GPU-based or custom ML chip instances.

Key Idea

  • General EC2 → not the primary focus for this exam — managed services cover most AI use cases.

  • EC2 for AI → relevant when you need GPU instances, custom training hardware (Trainium), or high-performance inference hardware (Inferentia).

EC2 Instance Types Relevant for AI

GPU-Based Instances

EC2 instances in the P and G families come equipped with high-performance GPUs — the processors that accelerate ML training and inference workloads.

P family (P3, P4, P5)  → high-performance GPU instances for ML training
G family (G3, G6)      → GPU instances for ML inference and graphics workloads

AWS Trainium Instances (Trn1)

EC2 instances powered by AWS Trainium chips — custom ML chips designed specifically for deep learning training on very large models (100 billion+ parameters).

See AWS Trainium for full details.

AWS Inferentia Instances (Inf1, Inf2)

EC2 instances powered by AWS Inferentia chips — custom ML chips designed specifically for high-performance, low-cost inference.

See AWS Inferentia for full details.

When to Use EC2 for AI vs Managed Services

Managed services (SageMaker, Bedrock) → preferred for most AI/ML workloads
                                         no infrastructure management needed
                                         faster to get started

EC2 with GPU/Trainium/Inferentia       → when you need direct hardware control
                                         when optimizing training or inference cost
                                         when building custom ML infrastructure

Exam Scope

Maarek explicitly flags what matters here. You need to:

  • Know EC2 instances can be GPU-based (P and G families).
  • Know AWS Trainium is for training large models on EC2.
  • Know AWS Inferentia is for high-performance, low-cost inference on EC2.
  • Know Trainium and Inferentia have the lowest environmental footprint among ML instance types.

Exam Domain

  • Domain 1, Task Statement 1.2: “Explain the capabilities of AWS managed AI/ML services” — EC2 GPU instances are the underlying infrastructure option when managed services are not used.
  • Domain 2, Task Statement 2.3: “Understand the benefits of AWS infrastructure for generative AI applications.”