aws_ appautoscaling_ target cost estimation
An Application Auto Scaling target is free. It registers a resource (ECS service, DynamoDB table, and others) as scalable, and the cost is the capacity that resource runs at.
An aws_
The cost is whatever the target scales. Registering an ECS service as a scalable target does nothing to your bill until the service scales out and runs more Fargate tasks or EC2 tasks. Registering a DynamoDB table's write capacity lets it scale between a min and max, and you pay for the provisioned capacity it settles at. So the target is the control surface, and the underlying resource is the meter.
The important knobs are min_
Terraform example
A minimal but realistic configuration that C3X can estimate.
resource "aws_appautoscaling_target" "ecs" {
service_namespace = "ecs"
resource_id = "service/prod/api"
scalable_dimension = "ecs:service:DesiredCount"
min_capacity = 2
max_capacity = 20
}
resource "aws_appautoscaling_policy" "cpu" {
name = "cpu-target-tracking"
policy_type = "TargetTrackingScaling"
resource_id = aws_appautoscaling_target.ecs.resource_id
scalable_dimension = aws_appautoscaling_target.ecs.scalable_dimension
service_namespace = aws_appautoscaling_target.ecs.service_namespace
target_tracking_scaling_policy_configuration {
predefined_metric_specification {
predefined_metric_type = "ECSServiceAverageCPUUtilization"
}
target_value = 60
}
}Pricing dimensions
What you actually pay for when you provision aws_.
| Dimension | Unit | What's being charged |
|---|---|---|
| Scaling target and policies | free | Registering the target and its scaling policies has no charge. $0 |
| Scaled capacity (floor) | varies by resource | min_ e.g. 2 Fargate tasks always on |
| Scaled capacity (ceiling) | varies by resource | max_ e.g. up to 20 Fargate tasks |
Optimization tips
Common ways to reduce aws_ cost without changing the workload.
Set min_ capacity to true idle demand
The minimum is your floor cost, paid around the clock. Do not pad it out of caution; a lower minimum with a fast scale-out policy costs less overall.
Cap max_ capacity to a real ceiling
An unbounded or very high maximum lets a metric error or traffic surge scale the target to a bill you never intended. Set the ceiling to the most you would actually pay for.
Use scheduled scaling for known patterns
If load is predictable (business hours, batch windows), schedule the minimum down overnight so you do not pay the floor cost during hours with no traffic.
FAQ
Does Application Auto Scaling cost money?
No. Registering a scalable target and attaching scaling policies is free, and the CloudWatch alarms it creates for target tracking are free. You pay only for the capacity the underlying resource runs at.
What determines the cost of an autoscaling target?
The resource it scales. An ECS target bills for the Fargate or EC2 tasks it runs; a DynamoDB target bills for the read and write capacity it provisions. min_
Can autoscaling cause a surprise bill?
Yes, if max_
Related resources
More AWS resources
Further reading
Estimate this resource in your own Terraform
Free, open source, no API key. C3X parses your Terraform and shows line-item cost for every resource, including aws_.