SaveMyCert
Log in
2 of 2 free questions left today·for 5 a day
Cloud Technology and Services

AWS Compute Services Explained: EC2, Lambda, ECS, EKS, and Fargate (CLF-C02)

17 min readCLF-C02 · Cloud Technology and ServicesUpdated

AWS compute services are the AWS offerings that run your code — virtual servers (Amazon EC2), containers (Amazon ECS, Amazon EKS, AWS Fargate) and serverless functions (AWS Lambda) — and CLF-C02 expects you to identify the right compute service for a described workload without hesitation. This lesson covers the full official scope of Task 3.3: Amazon EC2 and its instance families (general purpose, compute optimized, memory optimized, storage optimized, accelerated computing, plus the specialist HPC optimized family), the container orchestrators Amazon ECS and Amazon EKS, the serverless options AWS Lambda and AWS Fargate, why auto scaling equals elasticity, and what Elastic Load Balancing actually does. You will learn the matching logic the exam tests: who manages the servers, how long the workload runs, and whether capacity should adjust automatically. You will also learn to recognize Elastic Beanstalk, Lightsail, and AWS Batch on sight. By the end, every trigger phrase in a compute question should map to exactly one service in your head.

What you’ll learn

  • Identify the appropriate AWS compute service for a described workload
  • Match EC2 instance families, including accelerated computing and HPC optimized, to their target workloads
  • Distinguish Amazon ECS from Amazon EKS and compare the container capacity options, from the EC2 launch type to Fargate
  • Explain when AWS Lambda fits better than EC2 or Fargate, based on its event-driven, 15-minute execution model
  • State why auto scaling provides elasticity, what a load balancer is for, and which ELB type routes by URL path
  • Recognize Elastic Beanstalk, Lightsail, and AWS Batch and tell them apart

The 9 parts · about 15 min of reading

  1. How CLF-C02 frames computeStart hereSort compute by who manages what: EC2 at the full-control end, Lambda and Fargate at the serverless end, containers and helpers between.1 min
  2. Amazon EC2EC2 gives root access to resizable instances launched from an AMI; you patch the guest OS, pay while it runs, and keep full control.1 min
  3. EC2 instance familiesPick the family by the bottleneck: CPU means compute optimized, RAM memory optimized, local disk I/O storage optimized, GPUs accelerated.2 min
  4. Auto scalingAn Auto Scaling group adds and removes instances between set limits as demand changes and replaces failed ones: that is elasticity.1 min
  5. Elastic Load BalancingELB spreads requests across healthy targets in several AZs; ALB routes HTTP by path, NLB handles Layer 4 scale, and none adds servers.2 min
  6. Containers on AWSECS is AWS-native orchestration and EKS managed Kubernetes; containers run on EC2 you manage, AWS-managed instances, or Fargate.2 min
  7. Serverless computeLambda runs event-triggered functions up to 15 minutes, billed per request and duration; Fargate runs long-lived containers with no hosts.2 min
  8. Recognition-level computeBeanstalk deploys whole web apps onto adjustable EC2, Lightsail bundles simple cheap servers, and Batch queues and runs thousands of jobs.2 min
  9. Choosing the right compute serviceRead management appetite, duration and trigger, and packaging, then map them to a service, as a media startup does for three workloads.2 min

Mind map

EC2: full control, you patchLambda and Fargate: no instancesECS and EKS orchestrate containersScaling adjusts, load balancingspreads1✓Who manages whatAMI plus instance type, root accessYou patch the guest OSBilling stops on stop or terminateLift-and-shift and custom host agents2✓Amazon EC2Compute optimized: CPU-bound, gamingMemory optimized: datasets in RAMStorage optimized: local disk I/OAccelerated: GPUs, ML trainingNo special need: general purpose3✓Instance familiesGroup with min, max and desired countScale out and in on demand signalsReplaces failed instancesDemonstrates elasticity4✓Auto scalingSpreads traffic to healthy targetsALB: Layer 7, routes by path or hostNLB: Layer 4, millions of connectionsGateway LB: third-party appliancesNever adds capacity itself5✓Elastic Load BalancingECS: AWS-native orchestrationEKS: managed Kubernetes control planeManaged instances are still EC2Fargate: no instances at allECR stores images, not compute6✓ECS vs EKSLambda: event-driven, 15 minutes maxBilled per request and durationFargate: long-running containersFargate is not an orchestrator7✓Lambda and FargateBeanstalk: upload code, EC2 underneathLightsail: simple VPS, monthly priceBatch: queue and run thousands of jobsBeanstalk worker tier is not ascheduler8✓Beanstalk, Lightsail,BatchRead management, duration, packagingThumbnail on upload: LambdaKubernetes API, no hosts: EKS onFargateSpiky site: Auto Scaling behind an ALB9✓Choosing a serviceAWS compute services
Mind map

AWS Compute Services Explained: EC2, Lambda, ECS, EKS, and Fargate (CLF-C02)

EC2: full control, you patchLambda and Fargate: no instancesECS and EKS orchestrate containersScaling adjusts, load balancingspreads1✓Who manages whatAMI plus instance type, root accessYou patch the guest OSBilling stops on stop or terminateLift-and-shift and custom host agents2✓Amazon EC2Compute optimized: CPU-bound, gamingMemory optimized: datasets in RAMStorage optimized: local disk I/OAccelerated: GPUs, ML trainingNo special need: general purpose3✓Instance familiesGroup with min, max and desired countScale out and in on demand signalsReplaces failed instancesDemonstrates elasticity4✓Auto scalingSpreads traffic to healthy targetsALB: Layer 7, routes by path or hostNLB: Layer 4, millions of connectionsGateway LB: third-party appliancesNever adds capacity itself5✓Elastic Load BalancingECS: AWS-native orchestrationEKS: managed Kubernetes control planeManaged instances are still EC2Fargate: no instances at allECR stores images, not compute6✓ECS vs EKSLambda: event-driven, 15 minutes maxBilled per request and durationFargate: long-running containersFargate is not an orchestrator7✓Lambda and FargateBeanstalk: upload code, EC2 underneathLightsail: simple VPS, monthly priceBatch: queue and run thousands of jobsBeanstalk worker tier is not ascheduler8✓Beanstalk, Lightsail,BatchRead management, duration, packagingThumbnail on upload: LambdaKubernetes API, no hosts: EKS onFargateSpiky site: Auto Scaling behind an ALB9✓Choosing a serviceAWS compute services

How the exam tests this

CLF-C02 tests this task almost entirely through service-matching scenarios: a one-paragraph workload description asks which compute service fits, and the options typically mix EC2, Lambda, Fargate, and ECS or EKS, so you must key on management responsibility, duration, and packaging. Instance-family items describe a workload characteristic — CPU-heavy batch processing, an in-memory dataset, heavy local disk I/O — and ask you to name the optimized family. Expect at least one item equating auto scaling with the elasticity benefit, and one asking the purpose of a load balancer, often with 'adjusts capacity' planted as the wrong answer. Harder items combine two facts: a routing requirement together with a capacity requirement, a hardware requirement that rules out some instance families, or a duration or always-on requirement that rules out Lambda. Beanstalk, Lightsail, and Batch appear as recognition items and as near-miss distractors for each other.

Key takeaways

  1. EC2 = virtual servers with full OS control; you patch, size, and scale them, and they suit long-running workloads.
  2. Instance families by trigger: compute optimized = CPU-heavy (batch, gaming); memory optimized = in-memory datasets; storage optimized = high local disk I/O; accelerated = GPUs/ML; HPC optimized = tightly coupled CPU simulations (no GPUs); general purpose = balanced.
  3. Lambda runs event-driven functions, each invocation capped at 15 minutes, with pay-per-use billing on its default compute; choose EC2 for long-running or full-control workloads.
  4. Fargate is serverless compute for ECS or EKS containers with no instances at all, and it can keep a container service running all day — Lambda runs short functions, even when packaged as a container image.
  5. ECS is AWS-native container orchestration; EKS is managed Kubernetes — pick EKS whenever the question says Kubernetes or portability.
  6. Auto scaling adjusts capacity to demand — that is elasticity; a load balancer distributes traffic across existing targets for availability and fault tolerance.
  7. ELB types: ALB = HTTP/HTTPS (layer 7) with path- and host-based routing; NLB = TCP/UDP (layer 4) at extreme scale; Gateway LB = third-party network appliances; Classic = previous generation.
  8. One-liners: Elastic Beanstalk = upload code or a container, AWS provisions EC2 instances you can still adjust; Lightsail = simple VPS at a predictable monthly price; AWS Batch = queued batch jobs with compute that scales down when idle.
0/9
Ready to start

Part 1: How CLF-C02 frames compute

Sort compute by who manages what: EC2 at the full-control end, Lambda and Fargate at the serverless end, containers and helpers between.

1 min read · 9 parts, about 15 min in allStart lesson

Frequently asked questions

What is the difference between AWS Lambda and EC2?

EC2 gives you virtual servers with full operating system control: you choose the instance type, install software, patch the OS, and pay while instances run — ideal for long-running applications and migrated workloads. Lambda is serverless: you upload code that runs only when an event triggers it, AWS manages all servers and scaling automatically, and you pay per request and execution time. Choose Lambda for short, event-driven tasks with no infrastructure management; choose EC2 for continuous workloads, custom OS requirements, or anything that runs longer than Lambda's short-task limits.

What is AWS Fargate used for?

AWS Fargate is a serverless compute engine for containers. It works with Amazon ECS and Amazon EKS, running your containers with no EC2 instances for you to provision, patch, or scale. You define the CPU and memory each container needs and pay for those resources while the container runs, and a container service can stay running all day. Use Fargate when a team wants to run containerized applications without managing servers. Unlike AWS Lambda, which runs event-triggered functions for at most 15 minutes per invocation, Fargate suits always-on container services.

What is the difference between ECS and EKS?

Both are managed container orchestration services on AWS. Amazon ECS is the AWS-native orchestrator — fully managed, tightly integrated with services like Elastic Load Balancing and IAM, and the simplest way to run containers if you have no Kubernetes requirement. Amazon EKS is managed Kubernetes: AWS operates the Kubernetes control plane while you use standard Kubernetes APIs and tooling. Choose EKS when a scenario mentions Kubernetes, existing Kubernetes expertise, or portability of the orchestration layer; choose ECS for AWS-native simplicity. Both can run containers on EC2 instances or on serverless AWS Fargate.

Sign up free to mark lessons complete, bookmark topics and track your exam readiness.

Spotted a mistake in this lesson?