AWS in 1 Min · Episode 68

AWS Auto Scaling groups explained

A fleet that resizes itself. Watch the one-minute video, then read the details.

David Gomez1:16 video · 3 min read

"More traffic needs a bigger server." That is the old way: buy a bigger machine, and hope it's big enough for the busiest day of the year. In AWS the usual answer is the opposite: add more servers when it's busy, automatically, and remove them when the rush is over. The feature that does this is the Auto Scaling group.

What an Auto Scaling group is

An Auto Scaling group is a collection of EC2 instances that AWS manages as one unit. The group launches every instance from the same configuration, a launch template, so they are interchangeable: any one of them can be replaced at any time.

That last point is the mindset shift. Servers in a group are not pets you repair. If your application keeps important state on a single instance's disk, fix that first, because the group will terminate instances when it scales in.

Three numbers: minimum, maximum, desired

Every group has three settings:

  • Minimum: the group never goes below this number of instances.
  • Maximum: the group never goes above it. This is also your cost ceiling.
  • Desired capacity: how many instances should be running right now.

The group continuously works to make reality match the desired capacity. You can change the desired number by hand, but normally scaling policies change it for you, based on load or on a schedule, always within the minimum and maximum.

It heals itself

An Auto Scaling group monitors the health of its instances. If an instance is terminated or fails its health check, the group replaces it to get back to the desired capacity. Nobody is paged to launch a server at 3 a.m.

By default the group uses EC2 status checks. When the group sits behind a load balancer, you can also use the load balancer's health checks, so an instance whose application stopped answering is replaced even though the virtual machine itself looks fine. Forgetting to turn that on is a common mistake.

Spread across Availability Zones

Give the group subnets in several Availability Zones and it balances instances across them as it scales. If one zone has a problem, the instances in the other zones keep serving, and the group launches replacements where it can.

A group with a minimum of one instance can't be highly available. For anything that matters, run at least two instances in two zones.

What it costs

There are no additional fees for Amazon EC2 Auto Scaling. You pay for the resources it runs, such as EC2 instances, their EBS volumes and CloudWatch alarms. That is why scaling in matters as much as scaling out: capacity you remove at night stops costing money.

Where AI fits

Model servers are a natural fit. Put your inference servers in an Auto Scaling group and it adds GPU instances when requests climb and removes them when traffic is quiet. With GPUs this matters more than usual, because an idle GPU instance bills at the same rate as a busy one.

Two things to plan for:

  • GPU instances and large models are slow to start: the instance boots, then the model has to load. Keep a sensible minimum, and scale on a metric that rises early, such as requests per target or queue length, not only CPU.
  • GPU capacity can be scarce. A launch can fail for lack of capacity, so test scaling before you depend on it.

Quick recap

  • An Auto Scaling group is a managed fleet of interchangeable EC2 instances.
  • Set minimum, maximum and desired capacity.
  • It replaces unhealthy instances and balances across Availability Zones.
  • No extra fee: you pay for what it runs, so scaling in saves money.
AWS in 1 Min #68 · 1:16

Need an AWS expert on your team?

I'm David, an AWS expert and fractional cloud consultant. I work alongside your team to run your cloud and infrastructure: architecture, security, cost and day-to-day operations. You get senior AWS experience when you need it, without the cost of a full-time hire.

  • Architecture reviews and a clear plan for what to fix first
  • Security hardening: IAM, networking, audits
  • Lower AWS bills without slowing your team down
  • Hands-on help with AI workloads on AWS