Training / Certifications / AWS Cloud Practitioner / Amazon EC2, Auto Scaling and Load Balancing

AWS Cloud Practitioner (CLF-C02) · Lesson 16 of 26

Amazon EC2, Auto Scaling and Load Balancing

Read an EC2 instance type name, choose the right instance family for a workload, explain how Amazon EC2 Auto Scaling provides elasticity, and identify the purpose of Elastic Load Balancing and its Application, Network and Gateway Load Balancers.

Domain 3: Cloud Technology and Services (34%)Task 3.3About 6:24Voice-over and captionsStatic view for reduced motion
Lesson 16: Amazon EC2, Auto Scaling and Load Balancing Illustrative example: names and values are samples 1. Pick the right instanceWhat an instance type name meansFive families: which one fits?Match the workload's bottleneck2. ElasticityEC2 Auto Scaling: right numberElastic Load Balancing: spreadALB, NLB or Gateway Load BalancerDomain 3, Task 3.3: Identify AWS compute servicesAn EC2 instancea virtual server you rent:pick an image (OS) andan instance type (size)launch in minutesm172g3large4.1Series: m = general purpose2Generation: 7 (higher = newer)3Option: g = AWS Graviton (Arm)4Size: large (more = xlarge, 2xlarge…)Instance type = series + generation + options . sizeSame family, bigger size: more vCPUs and memoryGeneralpurposeM, TCPURAM–GPUDiskweb servers,code reposComputeoptimizedCCPURAM–GPUDiskbatch, media,game serversMemoryoptimizedR, XCPURAM–GPUDiskin-memory DBs,big analyticsAcceleratedcomputingP, G, Inf, TrnCPURAMGPUDiskML training,graphicsStorageoptimizedI, DCPURAM–GPUDiskhigh-I/O DBs,data streamingEach family tunes the mix of CPU, memory, accelerators and local diskThe store's workloadsBest fitStore website, steady trafficGeneral purpose (M)Encoding product videosCompute optimized (C)Large in-memory product cacheMemory optimized (R)Training a recommendation modelAccelerated computing (P, Trn)Database that needs fast local diskStorage optimized (I)Find the bottleneck: CPU → C, memory → R or X,GPU or ML chips → P, G, Inf, Trn; local disk I/O → I or DVisitors to the storeMon … Black Friday … SunFixed: 4 servers, alwaysabove the line: too few$below: idle serversToo few serversPages slow down or fail:lost salesToo many serversPaying for capacitynobody usesElasticity: capacity grows and shrinks with demand, automatically.On the exam: auto scaling provides elasticityAuto Scaling group: web-storeAvailability Zone aminaddedroomAvailability Zone bminaddedroomCPU above target→ desired 2 → 4Three numbersMinimum: 2 (never fewer)Desired: 4 (right now)Maximum: 6 (never more)Spread across AZsUnhealthy instance?Replaced automaticallyLaunch template = what to launch. Auto Scaling group = how many.No extra charge for Auto Scaling: you pay for the instancesManualYou change thedesired numberScheduledKnown events:“Fridays at 6 PM”DynamicTrack a metric:“keep CPU at 50%”PredictiveForecast frompast daily patternsrecommendedTarget tracking works like a thermostat: set the target,Auto Scaling adds or removes instances to hold itAZ aAZ bShoppersLoadbalancerone front doorfails health checknew: registeredhealth checksevery few secondsThe load balancer sends traffic only to healthy instances.Auto Scaling replaces failures and registers new instancesApplicationLoad BalancerLayer 7: HTTP, HTTPS, gRPCRoutes by path, hostor header: /cart → cartservers; web appsALBNetworkLoad BalancerLayer 4: TCP, UDP, TLSExtreme performance,very low latency,static IP addressesNLBGatewayLoad BalancerLayer 3 gateway + layer 4Third-party virtualappliances: firewalls,traffic inspectionGWLBWebsites and APIs → ALB. Millions of TCP or UDP connections → NLB.Classic Load Balancer is the previous generationIf the question says……think“Video encoding, batch jobs, game servers”Compute optimized“Large in-memory database or cache”Memory optimized“ML training, GPUs, graphics”Accelerated computing“High I/O on local storage”Storage optimized“Match capacity to demand automatically”EC2 Auto Scaling“Spread traffic; send only to healthy ones”Elastic Load Balancing“Route by URL path” / “static IP, TCP”ALB / NLBAmazon EC2 instance typesm7g.large = series, generation,option, sizeGeneral purpose: M, TC compute, R/X memory, I/D storageP, G, Inf, Trn: acceleratedElasticityAuto Scaling group: min,desired, max; replaces failuresLoad balancer: one front door,health checks, many AZsALB = layer 7, NLB = layer 4Right type for the job, right number of instances,and a load balancer in front

Tip: turn your phone sideways or use full screen for larger labels.

The voice-over is AI-generated with ElevenLabs, and the captions match it word for word. Press Space to play or pause and the arrow keys to change scenes.

Learning objective

Read an EC2 instance type name, choose the right instance family for a workload, explain how Amazon EC2 Auto Scaling provides elasticity, and identify the purpose of Elastic Load Balancing and its Application, Network and Gateway Load Balancers.

Exam mapping

Domain 3: Cloud Technology and Services (34%). Task statement 3.3 in the official exam guide.

Key takeaways

  • An EC2 instance type name such as m7g.large shows the series (m = general purpose), the generation (7), options (g = AWS Graviton, Arm-based) and the size (large); bigger sizes in the same family have more vCPUs and memory.
  • Instance families: general purpose (M, T) for balanced workloads such as web servers; compute optimized (C) for CPU-bound work such as batch processing, media transcoding and game servers; memory optimized (R, X) for large in-memory data sets.
  • Accelerated computing (for example P, G, Inf, Trn) uses GPUs or other hardware accelerators for ML and graphics; storage optimized (I, D) delivers very high, low-latency I/O to local storage.
  • Amazon EC2 Auto Scaling provides elasticity: an Auto Scaling group keeps the number of instances between a minimum and a maximum, at the desired capacity, balanced across Availability Zones, and replaces unhealthy instances. Auto Scaling has no extra charge.
  • Scaling can be manual, scheduled, dynamic (target tracking, step or simple policies based on CloudWatch metrics) or predictive (forecasts from historical patterns).
  • Elastic Load Balancing distributes traffic across targets in one or more Availability Zones and routes only to healthy targets. Application Load Balancer = layer 7 (HTTP/HTTPS, path or host routing); Network Load Balancer = layer 4 (TCP/UDP, extreme performance, static IPs); Gateway Load Balancer = third-party virtual appliances.

Exam tips

How the exam asks about this

Questions describe a situation and expect you to recognize the concept behind it.

If the question mentions…Think
Video transcoding, batch processing or dedicated game serversCompute optimized instances (C)
In-memory database or real-time processing of large data sets in memoryMemory optimized instances (R, X)
Machine learning training or graphics rendering with GPUsAccelerated computing instances (P, G, Trn)
Automatically add instances at peak and remove them when demand dropsAmazon EC2 Auto Scaling
Distribute requests across instances in several AZs and skip unhealthy onesElastic Load Balancing
Route /images and /cart to different servers; or need static IPs for TCPApplication Load Balancer; Network Load Balancer

Common traps

  • Auto Scaling changes the number of instances (scaling out and in); it doesn't change an instance's type or size. Moving to a bigger instance type is scaling up, done by you.
  • A load balancer spreads traffic and checks health, but it doesn't launch instances. Auto Scaling launches and replaces them; the two work together.
  • General purpose isn't “the cheapest” or “the slowest”: it's the balanced choice. Pick a specialized family only when the question names a bottleneck (CPU, memory, GPU, local disk I/O).
  • Gateway Load Balancer isn't for websites: it's for inserting third-party virtual appliances such as firewalls. Websites with path-based routing use an Application Load Balancer.

Practice

Exam-style questions

Answer each one before you open the explanation.

Question 1. A media company transcodes thousands of videos every night. The job is limited by processor speed, not by memory or disk. Which EC2 instance family is the best fit?

  1. Memory optimized
  2. Storage optimized
  3. Compute optimized
  4. General purpose
Show answer

C. Compute optimized. Compute optimized instances (C series) have high-performance processors for CPU-bound work such as media transcoding and batch processing. General purpose is tempting as a safe default, but it balances CPU with memory and networking, so it isn't the best fit when the bottleneck is clearly the processor. Memory and storage optimized target RAM and local disk I/O.

Question 2. An online store's traffic triples during holiday sales and drops sharply afterward. The company wants capacity to follow demand without manual work. Which AWS feature provides this elasticity?

  1. Amazon EC2 Auto Scaling
  2. Elastic Load Balancing
  3. A larger EC2 instance type
  4. AWS Compute Optimizer
Show answer

A. Amazon EC2 Auto Scaling. EC2 Auto Scaling launches and terminates instances as demand changes, within the group's minimum and maximum. Elastic Load Balancing is tempting because it's used alongside Auto Scaling, but it only distributes traffic; it doesn't add or remove instances. A larger instance type is a fixed change, and Compute Optimizer only recommends instance types.

Question 3. An Auto Scaling group has a minimum of 2, a desired capacity of 4 and a maximum of 8 instances. One instance fails its health check. What does Amazon EC2 Auto Scaling do?

  1. Lowers the desired capacity to 3
  2. Terminates the unhealthy instance and launches a replacement
  3. Sends an alert and waits for an administrator
  4. Changes the group's minimum to 3
  5. Moves all instances to another Availability Zone
Show answer

B. Terminates the unhealthy instance and launches a replacement. Auto Scaling replaces terminated or impaired instances to maintain the desired capacity, so the group returns to 4 healthy instances. Lowering desired capacity is tempting because one instance is gone, but desired capacity only changes through scaling actions, not through failures. It doesn't wait for a person or move every instance.

Question 4. A web application must route requests for /api to one group of servers and /images to another, based on the URL path. Which load balancer should it use?

  1. Network Load Balancer
  2. Gateway Load Balancer
  3. Classic Load Balancer
  4. Application Load Balancer
Show answer

D. Application Load Balancer. The Application Load Balancer works at layer 7 and routes HTTP and HTTPS requests by path, host or header. The Network Load Balancer is tempting because it's the high-performance option, but it works at layer 4 (TCP, UDP, TLS) and can't read URL paths. Gateway Load Balancer is for third-party appliances, and Classic is the previous generation.

Question 5. Which TWO statements describe Elastic Load Balancing? (Select TWO.)

  1. It distributes incoming traffic across targets in one or more Availability Zones
  2. It launches new EC2 instances when CPU utilization is high
  3. It changes the instance type of running instances to match demand
  4. It routes traffic only to targets that pass health checks
  5. It provides on-demand compliance reports for auditors
Show answer

A. It distributes incoming traffic across targets in one or more Availability Zones and D. It routes traffic only to targets that pass health checks. A load balancer spreads incoming traffic across targets such as EC2 instances in several Availability Zones, and its health checks keep traffic away from unhealthy targets. Launching instances when CPU is high is tempting, but that's EC2 Auto Scaling, which works together with the load balancer. ELB doesn't resize instances, and compliance reports come from AWS Artifact.

Transcript

Lesson transcript

The full narration, scene by scene. The captions file contains the same text with timings.

Scene 1 · 0:00

Lesson 16: EC2, Auto Scaling and load balancing. Welcome to Domain 3. Last time we finished security and compliance. Now we start on compute. Today covers two ideas. First, choosing the right Amazon EC2 instance: what an instance type name means, and the five families the exam asks about. Second, elasticity: how EC2 Auto Scaling keeps the right number of servers running, and how Elastic Load Balancing spreads traffic across them. This is Task 3.3.

Scene 2 · 0:32

Reading an instance type name. An EC2 instance is a virtual server you rent. You pick an image with the operating system, and an instance type that sets the CPU, memory, storage and networking. The name tells you a lot. Take m7g.large. The m is the series: general purpose. Seven is the generation; higher is newer. The g is an option: an AWS Graviton processor, which is Arm-based. And large is the size. Move up to m7g.xlarge and you get more vCPUs and memory.

Scene 3 · 1:07

Five instance families. Instance types are grouped into families, each tuned for a different mix. General purpose, the M and T series, balances CPU, memory and networking: good for web servers. Compute optimized, the C series, has high-performance processors. Memory optimized, R and X, holds large data sets in memory. Accelerated computing, such as P, G, Inferentia and Trainium, adds GPUs or other accelerators. And storage optimized, I and D, delivers very fast local disk I/O.

Scene 4 · 1:44

Match the workload to the family. Here's how to choose: find the bottleneck. The store's website, with steady traffic, runs fine on general purpose. Encoding product videos is CPU-bound, so compute optimized. A large in-memory product cache needs memory optimized. Training a recommendation model needs accelerators, so accelerated computing. And a database that hammers its local disk needs storage optimized. On the exam, the question usually names the bottleneck for you.

Scene 5 · 2:16

Why elasticity matters. Now our second idea. Traffic to the store isn't flat. It's quiet on a Monday night and huge on Black Friday. If the store runs a fixed four servers, it has too few at the peak, so the site slows down and sales are lost, and too many the rest of the week, so it pays for idle servers. Elasticity means capacity grows and shrinks with demand, automatically. The exam guide puts it simply: auto scaling provides elasticity.

Scene 6 · 2:46

EC2 Auto Scaling groups. Amazon EC2 Auto Scaling manages instances in an Auto Scaling group. You set three numbers. The minimum: the group never drops below it. The maximum: it never goes above it. And the desired capacity: how many should run right now. When CPU rises above the target, desired goes from two to four, and new instances launch, spread evenly across Availability Zones. If an instance becomes unhealthy, it's replaced. Auto Scaling itself is free: you pay for the instances.

Scene 7 · 3:21

Ways to scale. How does the desired number change? Manual scaling: you change it yourself. Scheduled scaling: for events you know about, such as every Friday at six PM. Dynamic scaling reacts to a metric. Its most common form, target tracking, works like a thermostat: keep average CPU at 50 percent, and Auto Scaling adds or removes instances to hold it. AWS recommends it. And predictive scaling forecasts demand from past daily and weekly patterns, then adds capacity ahead of time.

Scene 8 · 3:57

Elastic Load Balancing. Shoppers can't keep track of changing servers, so we put a load balancer in front. Elastic Load Balancing gives the store one front door and spreads incoming traffic across instances in several Availability Zones. It runs health checks and sends traffic only to healthy targets. Here, one instance fails its check, so it gets no traffic, and Auto Scaling replaces it. New instances are registered with the load balancer automatically, and the load balancer scales itself.

Scene 9 · 4:30

ALB, NLB or Gateway Load Balancer?. There are three current types. The Application Load Balancer works at layer 7 with HTTP, HTTPS and gRPC, and routes by path, host or header: send slash cart to the cart servers. Choose it for websites and APIs. The Network Load Balancer works at layer 4 with TCP, UDP and TLS, for extreme performance and static IP addresses. The Gateway Load Balancer runs third-party virtual appliances, such as firewalls. The Classic Load Balancer is the previous generation.

Scene 10 · 5:09

How the exam asks about this. Here's how the exam asks about this. Video encoding, batch jobs or game servers: compute optimized. A large in-memory database or cache: memory optimized. Machine learning training, GPUs or graphics: accelerated computing. High I/O on local storage: storage optimized. Matching capacity to demand automatically: EC2 Auto Scaling. Spreading traffic and sending it only to healthy instances: Elastic Load Balancing. Routing by URL path is an ALB; a static IP for TCP traffic is an NLB.

Scene 11 · 5:49

Recap: EC2, Auto Scaling and load balancing. To recap: an instance type name gives the series, generation, options and size. General purpose M and T suit most web servers; C is compute optimized, R and X are memory optimized, I and D are storage optimized, and P, G, Inferentia and Trainium are accelerated. Auto Scaling groups keep between a minimum and a maximum number of healthy instances, and load balancers spread traffic across them. Next, we'll run code without managing servers: containers and serverless.

Download captions (WebVTT)

Sources and accuracy

Checked against AWS documentation and the official CLF-C02 exam guide on October 18, 2026. AWS changes often, so confirm details in the current documentation. Diagrams and numbers in the animation are illustrative.

This free course is independent and isn't affiliated with or endorsed by Amazon Web Services. AWS and AWS Certified Cloud Practitioner are trademarks of Amazon.com, Inc. or its affiliates.

← Lesson 15Logging, Auditing and Compliance
Lesson 17Arrives

Preparing a team for AWS certification?

I run hands-on AWS training for teams, from Cloud Practitioner basics to architecture, built around your own environment.