Study guide

3.1 AWS Compute Services

AWS Certified Cloud Practitioner CLF-C02

Track your progress as you read

Finished sections get a check mark.

1 Introduction

About the AWS Cloud Practitioner (CLF-C02) Exam Study Strategies and Exam Tips

2 Domain 1: Cloud Concepts (24%)

1.1 What Is Cloud Computing? 1.2 Cloud Deployment Models 1.3 AWS Well-Architected Framework 1.4 Cloud Migration Strategies 1.5 Cloud Economics

3 Domain 2: Security and Compliance (30%)

2.1 The AWS Shared Responsibility Model 2.2 AWS Identity and Access Management (IAM) 2.3 AWS Security Services 2.4 Compliance and Governance 2.5 Network Security

4 Domain 3: Cloud Technology and Services (34%)

3.1 AWS Compute Services 3.2 AWS Storage Services 3.3 AWS Database Services 3.4 AWS Networking and Content Delivery 3.5 Management and Governance Services 3.6 AI/ML and Analytics Services 3.7 Application Integration and Other Services

5 Domain 4: Billing, Pricing, and Support (12%)

4.1 AWS Pricing Models 4.2 Billing and Cost Management Tools 4.3 AWS Support Plans 4.4 Additional Billing Concepts and Services

6 AWS Services Deep Dive

5.1 Compute Services Deep Dive 5.2 Storage and Database Deep Dive 5.3 Security Services Deep Dive 5.4 Architecture Best Practices and Design Principles 5.5 Practice Exam — Mixed Domain Questions

3.1 AWS Compute Services

Key Takeaways Explain This Topic AI

Amazon EC2 provides resizable virtual servers (instances) in the cloud with full OS-level control — the core IaaS compute service.

AWS Lambda is a serverless compute service that runs code in response to events — you pay only for the compute time consumed.

Amazon ECS and Amazon EKS are container orchestration services for Docker and Kubernetes workloads respectively.

EC2 instance types are optimized for different use cases: General Purpose (T, M), Compute Optimized (C), Memory Optimized (R, X), Storage Optimized (I, D), and Accelerated Computing (P, G).

Auto Scaling automatically adjusts the number of EC2 instances based on demand to maintain performance and minimize cost.

Last updated: October 2026

Quick Answer: AWS compute spans a spectrum from full virtual servers (Amazon EC2) to fully serverless functions (AWS Lambda). For the CLF-C02 you must match a scenario to the right service: EC2 for full OS control, Lambda for short event-driven code, ECS/EKS for containers, Elastic Beanstalk for managed web apps, and AWS Fargate for serverless containers. You are tested on what and when , not how to configure .

Amazon EC2 (Elastic Compute Cloud)

Amazon EC2 provides resizable virtual servers, called instances , in the cloud. It is the foundational Infrastructure as a Service (IaaS) offering and the most widely used AWS compute service. You choose an Amazon Machine Image (AMI) (the template containing the operating system and software), pick an instance type (the hardware profile), and launch — typically in under a minute.

  • EC2 Key Features
  • Full control over the operating system (Linux, Windows, macOS) and installed software
  • Instance types optimized for different workloads (see families below)
  • Flexible pricing models (On-Demand, Reserved, Savings Plans, Spot, Dedicated)
  • Security Groups act as a stateful virtual firewall at the instance level
  • Elastic IP addresses provide a static public IPv4 address you can remap
  • EBS volumes for persistent storage and instance store for temporary storage
  • User data scripts run at first boot to automate configuration
  • EC2 Instance Families

Family Optimized For Examples Use Cases

General Purpose (T, M) Balanced compute, memory, networking t3.micro, m6i.large Web servers, code repos, small/medium databases

Compute Optimized (C) High-performance processors c6i.xlarge Batch processing, gaming servers, scientific modeling, HPC

Memory Optimized (R, X) Large in-memory datasets r6i.large, x2idn.large In-memory databases (SAP HANA), real-time big-data analytics

Storage Optimized (I, D) High sequential read/write to local disk i4i.large, d3.xlarge Data warehousing, distributed file systems, NoSQL

Accelerated Computing (P, G) Hardware accelerators (GPUs) p5.48xlarge, g5.xlarge Machine learning training/inference, graphics rendering

On the Exam: You do NOT memorize specific sizes or prices. Memorize the mapping: T/M = general, C = compute, R/X = memory, I/D = storage, P/G = GPU/accelerated. A question describing "GPU-heavy machine learning training" points to P or G.

AWS Graviton

Many instance families offer a Graviton variant (e.g., m7g, c7g, r7g). Graviton is AWS's custom ARM-based processor that delivers better price-performance and lower energy use than comparable x86 instances. Graviton appears in Sustainability and Cost Optimization questions because it reduces both cost and carbon footprint.

EC2 Pricing Models

Pricing Model Description Best For Savings vs. On-Demand

On-Demand Pay per second (60-sec min, Linux) with no commitment Short-term, spiky, first-time workloads Baseline

Reserved Instances (RI) 1- or 3-year commitment to a specific instance type Steady-state, predictable workloads Up to 72%

Savings Plans Commit to a $/hour compute spend for 1 or 3 years Flexible discount across families/Regions Up to 72%

Spot Instances Use spare capacity at deep discounts; can be reclaimed Fault-tolerant, interruptible batch jobs Up to 90%

  • Dedicated Hosts A physical server dedicated to you BYOL licensing, strict compliance Varies
  • Dedicated Instances Instances on hardware isolated to your account Compliance, isolation Varies

On the Exam: On-Demand = no commitment. RI = specific instance commitment. Savings Plans = flexible commitment. Spot = cheapest but interruptible (2-minute warning). Dedicated = regulatory/licensing.

EC2 Auto Scaling

EC2 Auto Scaling automatically adjusts the number of instances to match demand. It scales out (adds instances) when load rises, scales in (removes instances) when load falls, and replaces unhealthy instances to maintain a desired count. This directly supports the Reliability and Cost Optimization pillars.

  • Scaling Policy Description
  • Target tracking Hold a metric at a target (e.g., average CPU at 50%)
  • Step scaling Add/remove capacity in steps tied to alarm thresholds
  • Scheduled scaling Scale on a known schedule (e.g., business hours)
  • Predictive scaling Use machine learning to forecast demand and scale ahead of it
  • AWS Lambda (Serverless Compute)

AWS Lambda runs your code in response to events without provisioning or managing servers. You upload a function, choose a runtime, and Lambda handles capacity, patching, scaling, and availability.

  • Feature Detail
  • Pricing Pay per request plus GB-second of compute duration (billed in 1-ms increments)

Max runtime 15 minutes (900 seconds) maximum per invocation for a standard (Event) function (the default timeout is 3 seconds); newer options such as Lambda Managed Instances, Durable Functions, and MicroVMs allow longer runs

  • Languages Python, Node.js, Java, Go, C#/.NET, Ruby, plus custom runtimes
  • Triggers API Gateway, S3, DynamoDB Streams, SNS, SQS, EventBridge, and more
  • Scaling Automatic, to thousands of concurrent executions
  • Management Zero servers — no OS patching, no capacity planning

When to use Lambda: event-driven processing (an S3 upload triggers a thumbnail job), serverless API backends (API Gateway + Lambda), stream processing from Kinesis, and short scheduled tasks via EventBridge. A standard Lambda function is the wrong choice for a single job longer than 15 minutes — those usually belong on ECS, Fargate, or AWS Batch.

  • Container Services
  • Amazon ECS (Elastic Container Service)

AWS's proprietary container orchestration service for Docker containers. It supports the EC2 launch type (you manage the instances) and the Fargate launch type (serverless — AWS manages the instances).

Amazon EKS (Elastic Kubernetes Service)

A managed Kubernetes control plane. Choose EKS when your team already standardizes on Kubernetes or needs portability across clouds.

AWS Fargate

A serverless compute engine for containers that works with both ECS and EKS. You define CPU/memory for your containers and Fargate provisions the infrastructure — no EC2 instances to patch or scale.

  • Service Description When to Use
  • ECS AWS-native orchestration Docker workloads, AWS-centric teams
  • EKS Managed Kubernetes Kubernetes standard, multi-cloud portability
  • Fargate Serverless containers (for ECS or EKS) You do not want to manage EC2 hosts
  • Other Compute Services

Service Description Use Case

AWS Elastic Beanstalk PaaS — deploy web apps without managing infrastructure Developers who want to focus on code

  • Amazon Lightsail Simple virtual private server with bundled pricing Blogs, small sites, simple apps
  • AWS Batch Run batch computing jobs at any scale Data processing, scientific computing
  • AWS App Runner Fully managed service for containerized web apps Deploy from source or container image
  • Amazon WorkSpaces Managed virtual desktop (DaaS) Remote workers needing Windows/Linux desktops

On the Exam: When a scenario stresses "no servers to manage," lean toward Lambda or Fargate. When it stresses "full OS control" or "lift-and-shift," lean toward EC2. When it stresses "just deploy my web app," lean toward Elastic Beanstalk.