![Estimating Your Public IPv4 Address Charges in AWS](https://assets.community.aws/a/2c6a4qyBJtUFP937F7Jt5Z5oSBa/estimating-your-public-IPv4-address-charges-in-AWS-jpg.webp)
Estimating Your Public IPv4 Address Charges in AWS
Strategies and Approaches for Further Optimizing Your AWS Expenses
Published Feb 8, 2024
Last Modified May 20, 2024
Following my publication revealing the AWS announcement and elucidating its direct financial implications for businesses relying on the platform, effective February 1, 2024, when they begin charging for the use of public IPv4 addresses, it is crucial to have the capability to estimate your public IPv4 address charges before initiating any changes.
This article explores various strategies to assist you in obtaining accurate estimates for your environments and provides insights into optimizing AWS bills further.
- AWS Cost and Usage Reports
- Estimating public IPv4 address charges
- Cost calculations based on Usage Types
- Cost calculations based on Operations - Monitoring you public IPv4 usage in AWS
- Resources and services using public IPv4 addresses
- Reason public IPv4 addresses are on specific resources - Public IPv4 usage optimization best practices
- Conclusion
AWS Cost and Usage Reports (CUR) are detailed reports that provide comprehensive information about your AWS usage and associated costs. These reports offer insights into how you are utilizing AWS resources, allowing you to analyze and manage your expenses effectively.
AWS CUR can update the report up to three times a day and deliver report files to your Amazon S3 bucket. You can read more here.
By leveraging AWS Cost and Usage Reports, organizations can gain transparency into their AWS spending, make informed decisions to optimize costs, and ensure efficient resource utilization.
Since July 2023, your Cost and Usage Report (CUR) inherently encompasses extensive usage data covering both actively used and idle public IPv4 addresses by default.
When configuring CUR, you can choose to enable “Include Resource IDs” for a more detailed analysis at the resource level.
![](https://assets.community.aws/a/2c6aLy87mpLVy9QQlu2RC0FyvvC/aws-include-resource-ids-JPG.webp)
In the revised CUR, you’ll observe two additional usage types associated with public IPv4 addresses:
PublicIPv4:IdleAddress
: displays usage data for all inactive public IPv4 addresses within your AWS account.PublicIPv4:InUseAddress
: displays usage across all actively used public IPv4 addresses associated with your AWS resources. These include EC2 public IPv4 addresses, Elastic IP addresses, and service managed public IPv4 addresses. BYOIPs (Bring Your Own IP addresses) are excluded from this representation, as there is no charge for utilizing BYOIP addresses.
The newly available CUR information can be incorporated into your automation processes related to billing data, offering a streamlined approach to track and calculate costs associated with public IPv4 addresses.
![](https://assets.community.aws/a/2c6aOerTta5X42VFYg65PxCbLgC/aws-.webp)
Aggregate
PublicIPv4:IdleAddress
to estimate idle IPv4 address usage, and PublicIPv4:InUseAddress
to estimate in-use IPv4 address usage.Starting February 1, 2024, using these nine public IPv4 addresses will cost $0.045 for the one-hour interval. This breaks down as:
- An existing cost for the total idle public IPv4 address usage: 2 IPs x 1 hour x $0.005/IP/hour = $0.010
- A new cost for the total in-use public IPv4 address usage: 7 IPs x 1 hour x $0.005/IP/hour = $0.035
For a more detailed analysis, utilize the data in the “lineItem/Operation” column to pinpoint public IPv4 usage according to IP type:
AllocateAddressVPC
: monitors Elastic IP addresses that are inactive within your AWS account.AssociateAddressVPC
: monitors Elastic IP addresses that are in-use and associated with your AWS resources.RunInstances
: monitors all EC2 public IPv4 addresses linked to your AWS resources within Virtual Private Clouds (VPCs).DescribeNetworkInterfaces
: monitors public IPv4 addresses managed by services within Virtual Private Clouds (VPCs).CreateVpnConnection
: monitors public IPv4 addresses linked to AWS Site-to-Site VPN connections.CreateAccelerator
: monitors public IPv4 addresses linked to AWS Global Accelerator accelerators.
Starting February 1, 2024, using these nine public IPv4 addresses will cost $0.045 for the one-hour interval. This breaks down as:
- An existing cost for the total idle Elastic IP address usage: 2 IPs x 1 hour x $0.005/IP/hour = $0.010
- A new cost for the total in-use Elastic IPv4 address usage: 2 IPs x 1 hour x $0.005/IP/hour = $0.010
- A new cost for the total in-use EC2 public IPv4 address usage: 3 IPs x 1 hour x $0.005/IP/hour = $0.015
- A new cost for the total in-use service managed public IPv4 address usage: 2 IPs x 1 hour x $0.005/IP/hour = $0.010
Which totals to $0.045 for the nine public IPv4 addresses during the one-hour time interval.
Public IP Insights is an Amazon VPC IP Address Manager (IPAM) free feature available in all AWS commercial and AWS GovCloud (US) Regions that provides a unified view of all public IPv4 addresses, making it easier for you to monitor, analyze and audit public IPv4 addresses used across AWS services, in your AWS account.
You need to create an Amazon VPC IPAM to use Public IP Insights. You are not charged for using Amazon VPC IPAM when you are only using Public IP Insights as a part of VPC IPAM Free Tier.
Public IP Insights aids in the discovery of:
- What resources and services are utilizing public IPv4 addresses: It shows public IPv4 addresses across IP types, including Amazon-owned Elastic IPs, service managed IPs, EC2 public IPs, and Bring Your Own IP (BYOIP) addresses.
![](https://assets.community.aws/a/2c6aTKyLBSHOnvysVeTOYaYE6Fp/aws-public-ip-types-jpg.webp)
- The reason public IPv4 addresses are being used on specific resources: It shows security groups associated with network interfaces to help you identify internet access policies that rely on public IPv4 connectivity, enabling you to assess the feasibility of adopting more efficient alternatives.
![](https://assets.community.aws/a/2c6aWdlnI4wyfnteojqnyMVToN3/aws-public-ip-insights-reasons-jpg.webp)
The following best practices can assist you in optimizing the utilization of public IPv4 addresses:
- Disable the auto-assignment of public IPv4 addresses on default subnets whenever possible.
![](https://assets.community.aws/a/2c6ahsyG3bfA8ZzSqb4ho1WWkVa/aws-disabling-the-auto-assignment-of-public-IPv4-addresses-JPG.webp)
subnets that host your Amazon ECS deployments, or RDS databases, may not need public IPv4 addresses.
- Consider disabling the auto-assignment of public IPv4 addresses during instance launch.
![](https://assets.community.aws/a/2c6akzMqOprFvTvVrCT8iNXyeoO/aws-disable-auto-assignment-of-public-IPv4-address-at-instance-launch-JPG.webp)
- Evaluate which resources need to be deployed in public subnets and require individual public IPv4 addresses.
Databases or container services can be deployed in private subnets, without being exposed directly to the internet.
- For remote access to resources within your VPCs, consider using Amazon EC2 Instance Connect (EIC) Endpoints instead of assigning public IPv4 addresses to each resource.
This will aid in optimizing the quantity of public IPv4 addresses linked to your resources and enhancing your security posture. Further insights can be found in my article here.
- Consider using Elastic Load Balancers or AWS Global Accelerator for inbound internet traffic.
These services assist in enhancing the availability and performance of your workloads while optimizing the utilization of public IPv4 addresses.
- For outbound internet traffic, NAT gateways can help you optimize public IPv4 address utilization.
NAT gateway provides the capability to conduct source address translation at scale within each Availability Zone.
In this article I covered how you can use new data in the AWS Cost and Usage Reports (CUR) for estimating charges associated with public IPv4 addresses.
Additionally, I provided an overview of Public IP Insights, a complimentary feature within Amazon VPC IPAM, facilitating the monitoring of public IPv4 address usage.
Furthermore, I explored established best practices and architectures to optimize the usage of public IPv4 addresses effectively.
If you enjoyed this article and found it helpful, please don’t forget to leave a heart ❤, comment 💬, clap 👏🏻, and share ➦ it to show your support.
Also, don’t forget to connect, follow me for more articles and support me by buying me a coffee. :-) Thank you!