Hands-on AWS knowledge base for developers Managed Ops
Talk to Us

EC2 Auto Scaling Cost: What It Really Adds to Your Bill

Export PDF Print-friendly layout with a copyright watermark; choose Save as PDF in the print dialog
EC2 Auto Scaling Cost: What It Really Adds to Your Bill

TL;DR

  • The Auto Scaling service itself costs nothing. Policies, launch templates and scaling activities are all free — every dollar in that bucket is really EC2, EBS, ELB or NAT.
  • Runaway spend is rarely a clever policy gone wrong. It's a group with no MaxSize ceiling, a scale-in cooldown shorter than the workload, and no one watching the account on Saturday.
  • Three cheap layers stop it: a budget with an auto-action, an EstimatedCharges alarm in us-east-1, and scheduled scale-to-zero plus a weekly orphan sweep.

Auto Scaling is free. The things it launches are not.

I've had this conversation maybe two dozen times. Someone opens Cost Explorer, filters to EC2, sees a 40% jump, and blames the autoscaling group they added last Tuesday.

The group didn't cost anything. It just made 40 instances exist at the same moment.

EC2 bills per second with a 60-second minimum, so a short burst stays cheap. An m6i.large runs somewhere around a dime an hour depending on region and type. Hold 200 of those for a day and you're at roughly $480 before EBS and NAT — hold them for a week because nobody noticed, and that's a used car.

Line item Who bills it Driven by the group?
EC2 instance seconds EC2 Yes — usually 80%+ of the number
EBS volume GB-months + snapshots EBS Yes, one root volume per instance
ALB/NLB hours + LCU ELB Partly — LCUs track traffic, not node count
CloudWatch alarms CloudWatch Yes, one or two per scaling policy
Detailed monitoring CloudWatch Yes, per instance, and rarely read
Data transfer + NAT processing VPC Yes — the one people miss

The NAT line is the sneaky one. A worker group that scales to 30 nodes and pulls container images or hits an external API on every boot turns a $30 NAT gateway into $300 of processing charges while the instance spend only doubles.

Policies, scaling activities and launch template versions cost zero. Deleting a dozen old launch versions won't move the bill by a cent.

Layer 1: a ceiling and a budget alarm before the group gets traffic

Set MaxSize on day one, not after the incident. My default is 2× expected peak, raised deliberately with a reason written down.

Then flip the billing toggle. In the Billing console, "Receive Billing Alerts" has to be on before the EstimatedCharges metric exists in CloudWatch. Until you do that, put-metric-alarm succeeds and the alarm sits in INSUFFICIENT_DATA forever — green dashboard, zero protection.

# must be us-east-1; the billing metric lives nowhere else
aws cloudwatch put-metric-alarm 
  --alarm-name "acct-monthly-150usd" 
  --namespace AWS/Billing --metric-name EstimatedCharges 
  --dimensions Name=Currency,Value=USD 
  --statistic Maximum --period 21600 --evaluation-periods 1 
  --threshold 150 --comparison-operator GreaterThanThreshold 
  --alarm-actions arn:aws:sns:us-east-1:111122223333:finops 
  --region us-east-1


Six-hour periods are deliberate. The metric refreshes a few times a day, and 5-minute periods just produce flapping `INSUFFICIENT_DATA` noise that everyone learns to ignore.

The second layer should be an actual budget, not just a friendly email:

```bash
aws budgets create-budget --account-id 111122223333 
  --budget '{"BudgetName":"acct-monthly","BudgetLimit":{"Amount":"400","Unit":"USD"},"TimeUnit":"MONTHLY","BudgetType":"COST"}' 
  --notifications-with-subscribers '[{"Notification":{"NotificationType":"ACTUAL","ComparisonOperator":"GREATER_THAN","Threshold":80,"ThresholdType":"PERCENTAGE"},"Subscribers":[{"SubscriptionType":"EMAIL","Address":"ops@example.com"}]}]'


A budget action that attaches a deny on `ec2:RunInstances` past the threshold is blunt. It has also saved me twice, and explaining a stuck deploy beats explaining a four-figure weekend.

## Layer 2: stop the group from chasing load it can't afford

Scale-out is fast and scale-in is slow. That asymmetry is the whole cost problem.

One worker group of mine went from 4 instances to 40 between 01:00 and 03:00. A consumer had wedged on a poison message, the queue depth climbed, and the group did exactly what I configured it to do. Cross-checking `describe-scaling-activities` against Cost Explorer's daily EC2 line pinned the spike to the hour; `GroupTotalInstances` in CloudWatch showed 40 nodes held until 08:40. About $380 for one night of a queue that never drained.

The fix was three config changes: MaxSize 16, `ScaleInCooldown` at 600 seconds, and a step adjustment that stops scaling out once messages-per-instance drops below a sane ratio. I verified it by replaying the same metric range through the new thresholds before trusting it — the policy would have flattened at 16 and stayed there.

| Knob | Default worth changing | Why |
|---|---|---|
| MaxSize | 2× expected peak | A hard ceiling beats any alarm |
| ScaleInCooldown | 300s → 600s for batch | Stops out/in flap on spiky queues |
| Detailed monitoring | Off | 1-minute metrics nobody reads |
| Mixed instances policy | capacity-optimized | Spot at 60-70% off for stateless work |

For stateless web and worker tiers, a mixed instances policy with `capacity-optimized` and a spot base around 60-70% is the single biggest lever you have. If you've ever seen `InsufficientInstanceCapacity` at 2am, that's one subnet running dry — spreading the group across three AZs and four instance types fixes it more reliably than any retry logic.

## Layer 3: scheduled off-hours and the weekly orphan sweep

Non-prod groups should be at zero most of their life.

```bash
aws autoscaling put-scheduled-update-group-action 
  --auto-scaling-group-name web-dev 
  --scheduled-action-name nights-off 
  --recurrence "0 20 * * MON-FRI" 
  --min-size 0 --max-size 0 --desired-capacity 0


Recurrence is UTC. For a team in UTC+8, a 20:00 UTC shutdown is 04:00 local and the 06:00 UTC start is 14:00 — the fleet is dark through the entire local morning. Check the offset before you schedule anything.

Also set min and max to 0, both of them. A scheduled action that only zeroes desired capacity gets overridden on the next target-tracking evaluation, typically within a minute or two, and you'll swear the schedule never fired.

Monday sweep for what autoscaling leaves behind:

```bash
aws ec2 describe-volumes --filters Name=status,Values=available 
  --query 'Volumes[].[VolumeId,Size,CreateTime]' --output table

aws ec2 describe-addresses 
  --query 'Addresses[?AssociationId==null].[PublicIp,AllocationId]' --output table

aws autoscaling describe-auto-scaling-groups 
  --query 'AutoScalingGroups[?length(Instances)==`0`].[AutoScalingGroupName,MinSize,MaxSize]' 
  --output table


That last query finds groups sitting at zero instances but still attached to a load balancer. The group is free; the ALB it's wired to is not.

## So the bill jumped. What do I check first?

Daily EC2 cost grouped by usage type, then scaling activities. In that order, always.

```bash
aws ce get-cost-and-usage 
  --time-period Start=2025-06-01,End=2025-06-08 
  --granularity DAILY --metrics UnblendedCost 
  --filter '{"Dimensions":{"Key":"SERVICE","Values":["Amazon Elastic Compute Cloud - Compute"]}}' 
  --group-by Type=DIMENSION,Key=USAGE_TYPE

aws autoscaling describe-scaling-activities 
  --auto-scaling-group-name workers --max-items 20 
  --query 'Activities[].[StartTime,StatusCode,Description]' --output table


The sanity math takes ten seconds: instance-hours ÷ 24 = average fleet size. If that average exceeds your peak, something scaled out and never came back — or `DeleteOnTermination` is false and you're paying for volumes from instances that died in March.

Most SMB accounts I look at don't need a smarter policy. They need a ceiling, an alarm that actually leaves `INSUFFICIENT_DATA`, and someone to read the sweep output each Monday. When that Monday sweep needs to happen without you, it's part of what we run at awsgood.com.

Go set MaxSize on your busiest group right now.

Sources

FAQ

Is EC2 Auto Scaling itself free?

Yes. The service has no charge for groups, launch templates, scaling policies or scaling activities. What you pay for is everything the group creates — EC2 instance seconds above all, then EBS volumes and snapshots, load balancer hours, NAT processing, and the handful of CloudWatch alarms backing each policy

Leave a Reply

Your email address will not be published. Required fields are marked *