aws_ eip cost estimation
A static public IPv4 address. Free while attached and in use, $0.005/hour while detached or unassociated. As of 2024, also charges per-hour for attached IPv4 in some scenarios.
An aws_
The legacy model (still true for many cases): an EIP attached to a running EC2 instance, NAT Gateway, or ELB is free. A detached or unassociated EIP is billed at $0.005/hour ($3.65/month).
The newer model (since February 2024): public IPv4 addresses in general are billed at $0.005/hour regardless of attachment status. This applies to: - Auto-assigned public IPs on EC2 instances (the ones from EC2's pool, not EIPs) - IPs attached to ELB and NAT Gateway - VPC IPv4 endpoints
This change was AWS's response to IPv4 scarcity. Existing EIPs attached to existing resources still benefit from the legacy free-while-attached pricing for backward compatibility, but new public IPv4 attachments do incur charges.
Practical implications: cleanup matters more than it used to. Detached EIPs from terminated instances continue to bill. Forgotten EIPs in old VPCs can add up.
c3x estimates EIPs based on the resource configuration. EIPs declared but not attached are flagged as billing. EIPs attached via aws_
Terraform example
A minimal but realistic configuration that C3X can estimate.
resource "aws_eip" "nat" {
domain = "vpc"
tags = {
Name = "production-nat-eip"
}
}
resource "aws_eip_association" "nat" {
instance_id = aws_instance.bastion.id
allocation_id = aws_eip.nat.id
}Pricing dimensions
What you actually pay for when you provision aws_.
| Dimension | Unit | What's being charged |
|---|---|---|
| EIP detached or unassociated | per hour | Standard pricing for an allocated EIP not currently attached to any resource. $0.005/hour ≈ $3.65/month |
| Public IPv4 (2024+ pricing) | per hour | Per AWS's February 2024 changes, public IPv4 addresses are billed regardless of attachment status for new attachments. $0.005/hour |
| Additional EIPs on same instance | per hour | Beyond the first EIP per running instance, additional attached EIPs are billed even under the legacy model. $0.005/hour each |
| EIP remapping | per remap | First 100 remaps/month free. $0.10 per additional remap. Rarely a meaningful cost. |
Optimization tips
Common ways to reduce aws_ cost without changing the workload.
Audit and release unused EIPs
$3.65/month per released EIPRun aws ec2 describe-addresses to list all allocated EIPs. Any without an AssociationId is detached and billing. Each one is $3.65/month forever. A handful add up to hundreds per year.
Use only one EIP per resource
$3.65/month per removed EIPAdditional EIPs on the same instance bill separately. For most use cases, one EIP is enough. Pair with a load balancer if you need multiple endpoints.
Skip EIPs for ephemeral workloads
Avoid unnecessary EIPsAuto-assigned public IPs from EC2's pool work for stateless web tiers. EIPs are only needed when the IP must persist across instance restarts. Don't allocate one if you don't need static addressing.
Use IPv6 where possible
100% on IPv6-served trafficIPv6 addresses are free. For workloads with IPv6-capable clients, dual-stack EC2 instances can serve traffic via IPv6 and avoid public IPv4 charges for that traffic.
FAQ
Are EIPs really free when attached?
It depends. EIPs attached before February 2024 retain free-while-attached pricing. New public IPv4 attachments (whether EIPs or auto-assigned IPs) are billed $0.005/hour regardless of attachment status. The line is fuzzy; check AWS billing for the actual behavior in your account.
Why am I billed for a detached EIP I forgot about?
AWS charges $0.005/hour for any EIP that's allocated but not attached to a running resource. The original purpose was to discourage hoarding IPs. Allocated EIPs from terminated instances continue to bill until released via aws ec2 release-address.
Does c3x estimate the 2024 public IPv4 charges?
Yes, with some caveats. The public IPv4 charge is per resource, not per declaration in Terraform. c3x estimates EIPs declared in aws_
What about IPv6 addresses?
IPv6 addresses are free in AWS. There's no per-hour charge for IPv6, no allocation limit. If you can serve traffic over IPv6, you save on public IPv4 charges. For IPv6 in c3x-managed resources, no separate cost line item is generated.
Related resources
More AWS resources
Further reading
- AWS Elastic IP cost: every public IPv4 now costs money
Since February 2024, AWS charges about $0.005 per hour (roughly $3.60/month) for every public IPv4 address, whether attached or idle. Idle Elastic IPs and sprawling public IPs add up fast. Here is what changed and how to cut it.
- Private IP vs public IP data transfer cost: the free path you might be missing
Traffic between resources over private IPs in the same AZ is free, but the same traffic over public or Elastic IPs is charged even within a region. Using the wrong address turns free traffic into a per-GB bill. Here is how to keep it free.
- Public IPv4 address cost: the charge AWS added to every address
AWS now charges about $0.005 per hour for every public IPv4 address, in use or idle, adding roughly $3.65 per month per address. For fleets with hundreds of public IPs the total is real. Here is how the charge works and how to cut it.
- Deleting unused load balancers and IP addresses: a small line that adds up
A load balancer with no targets and a public IP with no association each cost a few dollars to tens of dollars a month. Individually trivial, collectively thousands. Here is how to find them, verify they are dead, and remove them safely.
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_.