Staring at the AWS IPv6 migration docs recently – at the time when we tried to move Copr build system to combined IPv4/IPv6 stack from IPv4 – I wasn’t able to re-configure the pre-existing Fedora machines correctly for automatic IPv6 stack configuration. While there’s no problem with freshly started Fedora Cloud VMs (at the time of writing this article I work with Fedora 33 where is cloud-init-19.4-7.fc33.noarch), I struggled to instruct cloud-init to re-configure the existing IPv4-only network.

Note! Of course you first have to assign the IPv6 address in AWS (e.g. in web-UI -> the instance -> its networking interface config -> Actions -> Manage IP addresses -> Assign new IP address (ipv6)).

The only solution that worked for me was to use manual configuration. This was useful-workaround, at least till the old instances can be replaced with fresh ones (when they’d be replaced with Fedora 34 or 35).

So eventually the only thing I had to do was to modify the network device configuration file, like this:

$ cat /etc/sysconfig/network-scripts/ifcfg-eth0
# Created by cloud-init on instance boot automatically, do not edit.
...

# Manually appended!
IPV6INIT=yes
IPV6_DEFROUTE=yes
IPV6_AUTOCONF=yes
IPV6ADDR=2600:1f18:8ee:ae00:f595:7aa7:3966:671d/128

Reboot of the box made the IPv4+IPv6 stack fully working. Unfortunately, there’s still no Elastic IP support for IPv6 yet, so the traffic still can not be arbitrarily redirected (brings you AAAA outages when you are replacing VMs with newer ones).