This tool shows the future public IPv4 costs for a variety of AWS resources (see below) across all AWS regions from an account in a user-friendly terminal UI.
As of February 2024, AWS starts charging 3.65 USD monthly for each public IPv4 address. We will get charged regardless if we provision the IP ourselves or if AWS services provision IPv4 IPs on our behalf, such as for Load balancers.
AWS also offers a similar dashboard in the AWS console, and such data is available also in the cost visibility dashboards, but we try to also provide costs and even utilization metrics for some resources, which allow AWS customers to take more informed optimization actions. And the fact that this is open-source software makes it easier to integrate into different tools.
- Fetch and display the future IPv4 costs associated with:
- EC2 Instances
- Elastic IPs (EIPs)
- Load Balancers (LBs)
- Elastic Network Interfaces (ENIs)
- Interactive terminal UI to navigate through the data.
- Shows ELB metrics such as the amount of network traffic over the last 7 days, to inform optimization actions.
- IPv4 addresses for load balancers are determined through the DNS resolution of their public FQDN.
- Data is fetched in parallel across regions and services for faster results.
- Name tags are shown wherever possible, with failover to tags created automatically by ASGs and CloudFormation stacks.
- Add support for more resources included in the ENI list. (e.g. ECS, APIGW, etc.), see here for more details.
- Add support for additional resources not included in the ENI list. (e.g. VPN endpoints, etc.)
- Properly integrate the subnets view currently available when running with --subnets.
- Add support to dump data as CSV, JSON, YAML, XLSX, and whatever other file types may make sense.
- Add some nice anonymized screenshots to the Readme file. (DONE)
- Go (1.16 or later)
- AWS CLI credentials set in the shell environment, for a user/role configured with appropriate permissions.
go install github.com/leanercloud/aws-ipv4-cost-viewer@latestAfter installation, you can run the tool with:
aws-ipv4-costs-viewerNavigate through the UI using the arrow keys. Press ESC to exit.
Check out our other open-source projects
- awesome-finops - a more up-to-date and complete fork of jmfontaine/awesome-finops.
- Savings Estimator - estimate Spot savings for ASGs.
- AutoSpotting - convert On-Demand ASGs to Spot without config changes, automated divesification, and failover to On-Demand.
- EBS Optimizer - automatically convert EBS volumes to GP3.
- ec2-instances-info - Golang library for specs and pricing information about AWS EC2 instances based on the data from ec2instances.info.
For more advanced features of some of these tools, as well as comprehensive cost optimization services focused on AWS, visit our commercial offerings at LeanerCloud.com.
We're also working on an automated RDS rightsizing tool that converts DBs to Graviton instance types and GP3 storage. If you're interested to learn more about it, reach out to us on Slack.
We welcome contributions! Please submit PRs or create issues for any enhancements, bug fixes, or features you'd like to add.
This project is licensed under the Open Software License 3.0 (OSL-3.0).
Copyright (c) 2023 Cristian Magherusan-Stanciu, LeanerCloud.com.
*Elastic Network Interfaces (also include EC2, LBs amd EIPs)* | EC2 Instances (includes attached EIPs) | Load Balancers | EIPs not attached to instances
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββElastic Network Interfaces with Public IPsβββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββ¬βββββββββββββ¬ββββββββββββββββββββββ¬βββββ β
ββRegion βPublic IP βENI ID βCostβ β
ββββββββββββΌβββββββββββββΌββββββββββββββββββββββΌβββββ€ β
ββus-east-1β123.45.67.89βeni-1234567890abcdef β3.65β β
ββββββββββββΌβββββββββββββΌββββββββββββββββββββββΌβββββ€ β
ββus-east-1β123.45.67.89βeni-1234567890abcdef β3.65β β
ββββββββββββΌβββββββββββββΌββββββββββββββββββββββΌβββββ€ β
ββus-east-1β123.45.67.89βeni-1234567890abcdef β3.65β β
ββββββββββββΌβββββββββββββΌββββββββββββββββββββββΌβββββ€ β
ββus-east-1β123.45.67.89βeni-1234567890abcdef β3.65β β
ββββββββββββΌβββββββββββββΌββββββββββββββββββββββΌβββββ€ β
ββus-east-1β123.45.67.89βeni-1234567890abcdef β3.65β β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
--------------------------------
Public IPs attached to 34 Elastic Network Intefaces: $124.10
EC2: $25.55 for 7 instances
Load balancers: $83.95 for 23 load balancer IPs
and $18.25 for 3 Elastic IPs
Note: ENI costs also include those for EC2, LB and EIP. Still, unattached EIPs have an additional cost, so the total IPv4 cost isn't exactly the same as the ENI cost
--------------------------------
Use arrows to move around | Press ESC to exit
Elastic Network Interfaces (also include EC2, LBs amd EIPs) | *EC2 Instances (includes attached EIPs)* | Load Balancers | EIPs not attached to instances
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββEC2 Instances costsββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββ¬ββββββββββββββββββββββ¬βββββββββββββββ¬ββββββββββββββββββββ¬βββββββββββββββ¬ββββββββββββββββββββββ¬βββββββββββββββββββββββββ¬βββββ β
ββRegion βName Tag βInstance StateβInstance ID βPublic IP βVPC ID βSubnet ID βCostβ β
ββββββββββββΌββββββββββββββββββββββΌβββββββββββββββΌββββββββββββββββββββΌβββββββββββββββΌββββββββββββββββββββββΌβββββββββββββββββββββββββΌβββββ€ β
ββus-east-1βDev-Server βrunning βi-1234567890abcdef β123.45.67.89 βvpc-d5d4a0ac βsubnet-80f348ca β3.65β β
ββββββββββββΌββββββββββββββββββββββΌβββββββββββββββΌββββββββββββββββββββΌβββββββββββββββΌββββββββββββββββββββββΌβββββββββββββββββββββββββΌβββββ€ β
ββus-east-1β βrunning βi-1234567890abcdef β123.45.67.89 βvpc-d5d4a0ac βsubnet-80f348ca β3.65β β
ββββββββββββΌββββββββββββββββββββββΌβββββββββββββββΌββββββββββββββββββββΌβββββββββββββββΌββββββββββββββββββββββΌβββββββββββββββββββββββββΌβββββ€ β
ββus-east-1βtemp-db-load-instanceβrunning βi-1234567890abcdef β123.45.67.89 βvpc-0380ded1f8b84275fβsubnet-05b3af0340538bbf5β3.65β β
ββββββββββββΌββββββββββββββββββββββΌβββββββββββββββΌββββββββββββββββββββΌβββββββββββββββΌββββββββββββββββββββββΌβββββββββββββββββββββββββΌβββββ€ β
ββus-east-1βaws-nat βrunning βi-1234567890abcdef β123.45.67.89 βvpc-d5d4a0ac βsubnet-edad1fa7 β3.65β β
ββββββββββββΌββββββββββββββββββββββΌβββββββββββββββΌββββββββββββββββββββΌβββββββββββββββΌββββββββββββββββββββββΌβββββββββββββββββββββββββΌβββββ€ β
ββus-east-1βtest βstopped βi-1234567890abcdef β123.45.67.89 βvpc-d5d4a0ac βsubnet-6191cb29 β3.65β β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Elastic Network Interfaces (also include EC2, LBs amd EIPs) | EC2 Instances (includes attached EIPs) | *Load Balancers* | EIPs not attached to instances
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββLoad balancer costsββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββ¬βββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ¬βββββββββ¬ββββββββββββββββββββββββββ¬ββββββ β
ββRegion βLoad Balancer TypeβDNS Name βIP CountβTraffic MBs (last 7 days)βCost β β
ββββββββββββΌβββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌβββββββββΌββββββββββββββββββββββββββΌββββββ€ β
ββus-east-1βapplication | 1234567890abcdef.elb.us-east-1.amazonaws.com β3 β1.65 β10.95β β
ββββββββββββΌβββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌβββββββββΌββββββββββββββββββββββββββΌββββββ€ β
ββus-east-1βnetwork β1234567890abcdef.elb.us-east-1.amazonaws.com β2 β0.00 β7.30 β β
ββββββββββββΌβββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌβββββββββΌββββββββββββββββββββββββββΌββββββ€ β
ββus-east-1βapplication β1234567890abcdef.elb.us-east-1.amazonaws.com β3 β1.20 β10.95β β
ββββββββββββΌβββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌβββββββββΌββββββββββββββββββββββββββΌββββββ€ β
ββus-east-1βapplication β1234567890abcdef.elb.us-east-1.amazonaws.com β2 β4.17 β7.30 β β
ββββββββββββΌβββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌβββββββββΌββββββββββββββββββββββββββΌββββββ€ β
ββus-east-1βclassic β1234567890abcdef.elb.us-east-1.amazonaws.com β2 β166.95 β7.30 β β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Elastic Network Interfaces (also include EC2, LBs amd EIPs) | EC2 Instances (includes attached EIPs) | Load Balancers | *EIPs not attached to instances*
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββElastic IPsββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββββββββββββ¬ββββββββββββββββββββββββββββ¬ββββββββββββββ¬βββββββββββββββββββββββββββββββββββ¬βββββ β
ββRegion βName tag βPublic IP βAttached Resource βCostβ β
ββββββββββββΌββββββββββββββββββββββββββββΌββββββββββββββΌβββββββββββββββββββββββββββββββββββΌβββββ€ β
ββus-east-1β β123.45.67.89 β β7.30β β
ββββββββββββΌββββββββββββββββββββββββββββΌββββββββββββββΌβββββββββββββββββββββββββββββββββββΌβββββ€ β
ββus-east-1β β123.45.67.89 β β7.30β β
ββββββββββββΌββββββββββββββββββββββββββββΌββββββββββββββΌβββββββββββββββββββββββββββββββββββΌβββββ€ β
ββus-east-1βnat-prod-vpc-us-east-1a β123.45.67.89 βNAT Gateway: nat-1234567890abcdef β3.65β β
ββββββββββββ΄ββββββββββββββββββββββββββββ΄ββββββββββββββ΄βββββββββββββββββββββββββββββββββββ΄βββββ β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ