logo
Estimating Your Public IPv4 Address Charges in AWS

Estimating Your Public IPv4 Address Charges in AWS

Strategies and Approaches for Further Optimizing Your AWS Expenses

Published Feb 8, 2024
Last Modified Feb 13, 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.

  1. AWS Cost and Usage Reports
  2. Estimating public IPv4 address charges
    - Cost calculations based on Usage Types
    - Cost calculations based on Operations
  3. Monitoring you public IPv4 usage in AWS
    - Resources and services using public IPv4 addresses
    - Reason public IPv4 addresses are on specific resources
  4. Public IPv4 usage optimization best practices
  5. 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.
— AWS Cost and Usage Report showing where to select Resource IDs (picture by author)
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.
— Example of how these usage types appear in a CUR

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.
— Total number of public IPv4 addresses with a breakdown by type and association status
  • 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.
— TCP port 22 opened for remote SSH access from the internet (may not be necessary)

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.
— Where to disable the auto-assignment of public IPv4 addresses (picture by author)
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.
— Where to disable the auto-assignment of public IPv4 address at instance launch
  • 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.
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 and follow me for more articles. Thank you!