Mindbrews Podcast coming in Soon! Stay Tuned!

Developers & Open SourceTechnology

The AWS IPv4 Charges Disaster

In January 2024, Amazon Web Services (AWS) made a significant change to its pricing policy for public IPv4 addresses. Due to the growing scarcity of IPv4 addresses, AWS introduced charges for public IPv4 addresses that were previously available at no additional cost. In this article, I will examine the ramifications of these changes, AWS’s service support for the IPv6 stack, and the implications for organisations operating entirely on AWS with hundreds of nodes in public VPCs.

What’s Changed?

With the new pricing structure introduced five months ago, customers using AWS’s public IPv4 resources, previously only limited to unused elastic IPv4 IPs, now face hourly charges. This shift reflects the limited availability of IPv4 addresses globally.

Ref: AWS Blog

The new pricing is set at $0.005 per hour per public IPv4 address. This results in an approximate additional cost of $3.80 per month* per running instance using a public IPv4 address. Don’t get me wrong, but there’s no option but to use it if your applications connect to the internet for download/upload, even to internal AWS services such as S3. The alternative is to use VPC Endpoints, but that’s not cheap either, and we’ll come back to that.

The lowest-cost instance on AWS is t2.nano, which costs around $4.94 per month*. With the new changes, using a public IP will add $3.80 more, almost doubling the cost. That’s like running two instances for the price of one, which is absurd!

Why Though?

IPv4 addresses are quite limited, and they are becoming scarce as more and more devices come online—from routers to servers, mobile devices, portable devices, IoT devices, and more. Due to this high demand for limited IPv4 addresses, the price has shot up in the last few years from around $15 per IP to now roughly $60 per IP. When scaled to millions of VMs running on AWS, this represents a huge cost for them.

Source: ipv4.global
Source: Ipxo

IPv6, however, can accommodate a lot more—a hell of a lot more! IPv4, with its 32-bit address, can accommodate up to 4.3 billion addresses. IPv6, on the other hand, is a 128-bit address and can accommodate up to 340 undecillion addresses! Yeah, I don’t know how many zeros that has either.

Yeah, we get it, you wanted to make a “change”

I get it! AWS wants everyone to acknowledge the long-term existence of IPv6, and being one of the major cloud providers, they think forcing people to stop using IPv4 and switch to IPv6 will eventually push everyone in that direction. But before making this change, they should have checked their own garden of services first. While most AWS services now support IPv6, many still either lack any support or have only partial support for IPv6.

And that’s not the only issue. The bigger problem is that many services running outside AWS might still not support IPv6, meaning you can’t communicate with them without having an IPv4 address yourself. This is where the trouble starts.

Applications usually connect with third-party services over the internet for tasks like sending emails, SMS, or pushing and accessing data to/from other systems. If those services don’t support IPv6, you have no option but to use a public IPv4 address yourself. And guess what that comes with? Yes, a $3.80 monthly charge!

Now, AWS provides various methods such as NAT Gateways so that multiple services in the same VPC can use just one IPv4 address to connect to the internet and access data from services that don’t support IPv6. That sounds amazing, right? Well, not quite. If you check the pricing for NAT, it’s also billed per hour and based on the amount of data transferred through the NAT. And on top of that, you still incur the IPv4 charge because you’re using it!

The Impact

Here’s a rough estimate of how much you’ll be paying in addition to the new public IPv4 charges if you were running a 100-node cluster on AWS.

When using Public IPv4When using NAT with a private subnet
Cost per IP: $0.005/HourNAT Charges (Hourly): $0.045 / Hour
Number of Nodes: 100NAT Charges (Data Transfer): $0.045/GB
Total Cost (Hourly): 100 * 0.005 = $0.5/HourAssuming you’re transferring an average of 1TB per month across all nodes,
Total Cost (Monthly): 760 * 0.5 = $380/Month0.045 * 760 Hours + 0.045 * 1024 GB = $34.2 + $46.08 = $80.28 / Month for 1 TB
That’s an additional $380 every month you’ll be paying for just using the Public IPs.

This is way cheaper than actually using public IPs and makes me wonder if AWS really wants people to switch to IPv6, or if it’s just a way to force people to use AWS services instead. This could lock them in, as they would have to modify their entire code infrastructure to move to another provider.

Final Thoughts

The implementation of AWS’s IPv4 pricing policy has significantly impacted organizations with extensive infrastructure needs. While IPv6 offers a viable long-term solution, the transition involves complexities and interim costs associated with solutions like NAT. Organizations must evaluate their network architecture and accelerate their transition to IPv6 to manage costs effectively and sustain scalability.

AWS may be trying to encourage the adoption of IPv6, but this strategy might have a small impact since various competitors are not charging for IPv4. Currently, IPv4 remains a necessity. Unless a substantial majority of the world transitions to IPv6, charging for IPv4 does not make much sense.

* Hourly calculations are done assuming 760 hrs per month

Related posts



Apple Watch Series 6: Here’s Everything You Need To Know



Developers & Open SourceTechnology

Everything You Should Know About Full Stack Development