aws_apprunner_service cost estimation
A managed container service that scales to zero between requests. Priced on provisioned memory plus active vCPU, with separate build minutes.
An aws_apprunner_service runs a container from a source image or repository with autoscaling and no infrastructure to manage. Its pricing model is unusual and worth understanding: it separates the cost of keeping an instance warm from the cost of actively serving requests.
Provisioned instances (warm, ready to serve) bill for memory only, at roughly $0.007/GB-hour. While an instance is actively handling requests, vCPU is added at roughly $0.064/vCPU-hour on top of that memory charge. So an idle-but-warm 1 vCPU / 2 GB service costs the memory rate continuously; under load it also accrues the active vCPU rate. There's also a per-minute build charge (~$0.005/min) when App Runner builds from source.
c3x prices the provisioned-memory floor directly from the cpu and memory settings, and treats active vCPU hours and build minutes as usage-based dimensions you supply in c3x-usage.yml. This split is the key insight: a low-traffic App Runner service costs far less than a comparable always-on Fargate task, because you mostly pay the memory floor.
Terraform example
A minimal but realistic configuration that C3X can estimate.
resource "aws_apprunner_service" "web" {
service_name = "web"
source_configuration {
image_repository {
image_identifier = "public.ecr.aws/aws-containers/hello-app-runner:latest"
image_repository_type = "ECR_PUBLIC"
image_configuration {
port = "8000"
}
}
}
instance_configuration {
cpu = "1024"
memory = "2048"
}
}Pricing dimensions
What you actually pay for when you provision aws_apprunner_service.
| Dimension | Unit | What's being charged |
|---|---|---|
| Provisioned memory | per GB-hour | Memory for warm (provisioned) instances, billed continuously while the service exists. c3x prices this from the memory setting at 730 hours/month. $0.007/GB-hour |
| Active vCPU | per vCPU-hour | vCPU billed only while instances are actively handling requests. Usage-based; define active vCPU-hours in c3x-usage.yml. $0.064/vCPU-hour |
| Build minutes | per minute | Charged when App Runner builds from source (not for pre-built images). Usage-based. $0.005/build-minute |
Sample C3X output
Example output from c3x estimate (1 vCPU / 2 GB, memory floor only):
aws_apprunner_service.web
└─ Provisioned memory (2 GB) 1,460 GB-hours $10.22
OVERALL TOTAL $10.22
(active vCPU & build minutes usage-based)Optimization tips
Common ways to reduce aws_apprunner_service cost without changing the workload.
Lean on scale-to-zero for spiky traffic
Idle vCPU vs always-onApp Runner only charges active vCPU while serving. For bursty or low-traffic services this is far cheaper than an always-on Fargate task that bills vCPU 24/7.
Use pre-built images to avoid build minutes
All build minutesBuilding from source charges per build-minute. Pushing a pre-built image to ECR and pointing App Runner at it removes the build charge entirely.
Right-size memory, since it's the always-on floor
Proportional to memoryProvisioned memory bills continuously. Dropping from 4 GB to 2 GB halves the warm floor. Set the smallest memory that holds your working set.
FAQ
How does c3x estimate App Runner cost?
It prices the provisioned-memory floor from the memory setting at 730 hours/month. Active vCPU hours (only billed while serving requests) and build minutes are usage-based and supplied in c3x-usage.yml.
Why is the baseline estimate just the memory cost?
App Runner bills warm instances for memory continuously but only charges vCPU while actively handling requests. Without request-volume input, the honest standing cost is the provisioned-memory floor.
Is App Runner cheaper than Fargate?
For low or spiky traffic, usually yes, because Fargate bills both vCPU and memory continuously while App Runner only adds vCPU during active request handling. For steady high traffic the two converge.
Do build minutes always apply?
Only when App Runner builds from a source repository. If you deploy a pre-built container image, there's no build charge.
Does App Runner scale to zero?
It scales provisioned instances down to a minimum (which still bills the memory floor) and only charges vCPU when requests arrive. It's not strictly zero like Lambda, but the active-vCPU model makes idle time cheap.
Related resources
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_apprunner_service.