"IPv4 is all a VPC will ever need." For a small setup, maybe. But IPv4 addresses run out in two ways. Inside a VPC, big fleets of servers and containers can use up every address in a subnet. Outside, public IPv4 addresses are scarce, and AWS now charges for each one you use, attached or idle. IPv6 solves both, as long as you understand how differently it behaves.
Dual stack: IPv6 next to IPv4
IPv6 addresses are 128 bits long instead of 32, so the supply is practically endless.
In AWS you normally don't replace IPv4, you add IPv6 beside it. A VPC must always have an IPv4 CIDR block, and you can associate an IPv6 block with it. Resources can then have both kinds of address. That's dual stack. AWS also supports IPv6-only subnets for workloads that don't need IPv4 at all.
The sizes: /56 and /64
- When you ask for an Amazon-provided IPv6 block, your VPC gets a /56. You don't pick the range; AWS assigns it from its pool.
- Each subnet normally gets a /64 from that block. A /56 has room for 256 subnets of that size.
A single /64 holds about 18 quintillion addresses. Running out inside a subnet stops being something you plan for.
Public by default
This is the part that surprises people. In IPv4 you're used to private ranges like 10.0.0.0/16, hidden behind NAT. With Amazon-provided IPv6 blocks, addresses are globally unique, and therefore public by default. There's no NAT in between hiding them.
Public doesn't mean reachable, though. Whether the internet can actually reach an instance still depends on your route tables and security groups:
- A subnet with an IPv6 route to an internet gateway is public: traffic can flow both ways.
- For a private subnet, use an egress-only internet gateway. Your instances can open connections out to the internet over IPv6 (for updates or API calls) and receive the replies, but the internet can't start a connection to them. It's stateful, there's no hourly charge for the gateway itself, and it plays the role a NAT gateway plays for IPv4.
Don't forget the rules
Enabling IPv6 is not one switch. The common mistakes:
- Security groups: a rule for
0.0.0.0/0covers IPv4 only. IPv6 needs its own rule, written with::/0or a specific IPv6 range. This cuts both ways: forget it and traffic fails, or add it carelessly and you've opened a port to the whole IPv6 internet. - Route tables: add IPv6 routes (
::/0to the internet gateway or the egress-only gateway). - Network ACLs: custom ACLs need IPv6 entries too.
- Subnets and instances: each subnet needs its own IPv6 block, and instances need an IPv6 address assigned.
- Everything else: check that the services, load balancers and on-premises networks you depend on support IPv6 before you rely on it.
Where AI fits
AI platforms multiply the number of things that need an address: thousands of batch workers, inference containers, short-lived agent sandboxes. In Kubernetes every pod takes an IP address, and IPv4 subnets fill up quickly at that scale.
Amazon EKS lets you create a cluster with the IPv6 family, where each pod gets its own IPv6 address. AWS documents it as a way to avoid IPv4 address exhaustion. Two things to know before choosing it: you pick the IP family when you create the cluster and can't change it afterwards, and the VPC still needs IPv4 CIDR blocks as well.
Quick recap
- Dual stack adds IPv6 next to IPv4; the VPC gets a /56, subnets a /64.
- IPv6 addresses are public by default; there's no NAT.
- Use an egress-only internet gateway to keep private servers private.
- Security groups, route tables and ACLs need their own IPv6 rules.