aws_network_interface cost estimation
An elastic network interface is free. AWS charges nothing for the ENI or its private IPs. Cost comes from the instance it attaches to, any Elastic IP left idle on it, and the traffic it carries.
An aws_network_interface is an elastic network interface (ENI): a virtual NIC with a MAC address, one or more private IPs, and security group bindings that you attach to an EC2 instance, a load balancer node, an RDS instance, a Lambda in a VPC, or an interface VPC endpoint. Creating an ENI and assigning it private IP addresses is free. There is no per-ENI or per-private-IP charge.
The cost is indirect. An ENI carries traffic, and that traffic is what generates data transfer charges: cross-AZ traffic at about $0.01/GB each way, internet egress at standard rates, and inter-region transfer. The ENI is also where an Elastic IP attaches, and an EIP is free only while associated with a running instance; an EIP sitting on a stopped instance or an unattached ENI is billed at about $0.005/hour (~$3.60/month). So the trap is not the ENI, it is an idle public IP hanging off one.
There is nothing to optimize on the ENI itself. The useful checks are: remove Elastic IPs from interfaces that are not actively serving, and treat an ENI attached across an AZ boundary from its peers as a cross-AZ transfer signal. c3x prices the attached instance, any idle Elastic IP, and the transfer the interface carries, and treats the ENI as free.
Terraform example
A minimal but realistic configuration that C3X can estimate.
resource "aws_network_interface" "app" {
subnet_id = aws_subnet.private.id
private_ips = ["10.0.1.20"]
security_groups = [aws_security_group.app.id]
tags = {
Name = "app-eni"
}
}Pricing dimensions
What you actually pay for when you provision aws_network_interface.
| Dimension | Unit | What's being charged |
|---|---|---|
| Network interface | free | The ENI and its private IP addresses have no charge. $0 |
| Idle Elastic IP on the ENI | per hour | An Elastic IP attached to an unused ENI or stopped instance is billed hourly. ~$0.005/hour (~$3.60/month) |
| Data transfer | per GB | Cross-AZ, internet egress, and inter-region traffic the interface carries. Cross-AZ: $0.01/GB each way |
Optimization tips
Common ways to reduce aws_network_interface cost without changing the workload.
Release idle Elastic IPs
~$3.60/month per idle EIPAn Elastic IP on an unattached ENI or a stopped instance is billed hourly. Release EIPs you are not actively serving traffic on to stop the ~$3.60/month charge each.
Clean up orphaned ENIs
Deleted Lambdas, load balancers, and endpoints can leave detached ENIs behind. They are free but can hold billed Elastic IPs, so removing them prevents surprise charges.
Watch for cross-AZ ENI placement
An ENI serving traffic to peers in another AZ signals cross-AZ transfer cost. Colocate the interface and its peers in one AZ where latency and availability allow.
FAQ
Does an elastic network interface cost money?
No. ENIs and their private IP addresses are free. You pay for the instance the ENI attaches to, any Elastic IP left idle on it, and the data transfer the interface carries.
Why am I charged for an ENI that has no instance?
The ENI is not charged, but an Elastic IP associated with an unattached ENI is billed at about $0.005/hour. Release the Elastic IP or attach the ENI to a running instance to stop the charge.
Do secondary private IPs on an ENI cost extra?
No. Assigning multiple private IP addresses to an ENI is free. Only public Elastic IPs left idle carry a charge; private IPs never do.
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_network_interface.