aws_eks_fargate_profile cost estimation
A Fargate profile is free. It is a selector that decides which Kubernetes pods run on Fargate, and those pods are billed per vCPU-hour and per GB-hour while they run.
An aws_eks_fargate_profile tells EKS which pods should run on Fargate rather than on EC2 worker nodes. It matches pods by namespace and labels. Creating the profile costs nothing. The cost appears when pods that match the profile are scheduled, because Fargate then provisions right-sized compute for each pod and bills for it.
Fargate prices each pod on the vCPU and memory it requests, rounded up to the nearest supported Fargate size, and charges per vCPU-hour and per GB-hour for as long as the pod runs. A pod requesting 0.25 vCPU and 0.5 GB is billed at that size continuously; a pod requesting 1 vCPU and 2 GB costs roughly $0.04/hour, so one such pod running around the clock is about $30/month. Unlike EC2 node groups, there is no bin-packing: every pod gets its own micro-VM and you pay per pod, so many small pods can cost more than packing them onto a shared node.
The lever is the pod's resource requests, not the profile. Over-requesting CPU or memory rounds up to a larger Fargate size and inflates every matched pod. c3x reads the resource requests of the workloads a profile selects and prices the Fargate compute they will consume, so you can compare Fargate against an EC2 node group before you deploy.
Terraform example
A minimal but realistic configuration that C3X can estimate.
resource "aws_eks_fargate_profile" "default" {
cluster_name = aws_eks_cluster.main.name
fargate_profile_name = "default"
pod_execution_role_arn = aws_iam_role.fargate.arn
subnet_ids = aws_subnet.private[*].id
selector {
namespace = "default"
labels = {
compute = "fargate"
}
}
}Pricing dimensions
What you actually pay for when you provision aws_eks_fargate_profile.
| Dimension | Unit | What's being charged |
|---|---|---|
| Fargate profile | free | The profile and its selectors have no charge. $0 |
| Fargate vCPU | per vCPU-hour | The vCPU each matched pod requests, rounded to a Fargate size, billed while the pod runs. ~$0.04048/vCPU-hour |
| Fargate memory | per GB-hour | The memory each matched pod requests, rounded to a Fargate size, billed while the pod runs. ~$0.004445/GB-hour |
Optimization tips
Common ways to reduce aws_eks_fargate_profile cost without changing the workload.
Right-size pod requests
Often 30 to 50% on over-requested podsFargate rounds requests up to the nearest supported size and bills that. Set CPU and memory requests to real usage so pods do not jump to a larger, more expensive size.
Reserve Fargate for spiky or small workloads
Steady, dense workloads are usually cheaper on an EC2 node group where pods bin-pack. Use Fargate profiles for bursty or low-count pods that would leave a node idle.
Scale matched deployments to demand
Fargate bills per running pod, so use the Horizontal Pod Autoscaler to scale matched deployments in during quiet periods rather than leaving idle pods running.
FAQ
Does an EKS Fargate profile cost money?
No. The profile is free. You pay only for the pods it selects, which Fargate bills per vCPU-hour and per GB-hour based on each pod's resource requests while it runs.
How is Fargate cost calculated for EKS pods?
Each pod's CPU and memory request is rounded up to the nearest Fargate size and billed per vCPU-hour and per GB-hour for its lifetime. A 1 vCPU, 2 GB pod running continuously is about $30/month.
Is Fargate cheaper than EC2 node groups for EKS?
It depends on density. Fargate charges per pod with no bin-packing, so many small pods can cost more than packing them onto a shared EC2 node. Fargate wins for spiky or sparse workloads.
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_eks_fargate_profile.