[IPv4] Can you finally change EC2 IPv4 after launch?

Hello. I'm Ken, and I'm happy that my hay fever has improved this year
AWS made a very exciting announcement the other day, so I felt I had to write a blog about it, and so I did right away
Announcement Contents
AWS recently announced that they would also be charging for IPv4! With the yen still weak, I'm sure many companies were left wondering, "Huh?"
However, I'm sure there were many people who thought that to remove IPv4, they would have to create an EC2 instance again from an AMI and switch over. And then this announcement came out! (I had predicted it, though... (Hmm, that's a lie lol (voices around me)))
I'm quoting the AWS announcement verbatim, but to summarize briefly, it's now possible to remove and add public IP addresses assigned to EC2 instances. This means that from now on, even if you accidentally assign an IPv4 address to an EC2 instance, you won't have to go through the trouble of re-creating the instance. Conversely, if you forget to assign an IPv4 address, it no longer seems necessary to recreate the instance. This is very good news
Amazon VPC announces a network interface setting to dynamically remove and add an auto assigned public IPv4 address on EC2 instances. With this capability, customers that no longer require an auto assigned public IPv4 address on their EC2 instance can remove the public IPv4 address, and if needed attach back a new public IPv4 address, by modifying the public IP setting on the network interface. Before today, once a public IPv4 address was auto assigned to EC2 instance it was not possible to remove it. It remained on the network interface for the lifetime of the EC2 instance.
The public IP setting on the network interface makes it easier for customers to be public IPv4 and reduce public IPv4 cost. Customers that no longer need the auto assigned public IPv4 or are migrating to using private IPv4 address for SSH using EC2 instance connect endpoint can simply remove the auto assigned public IPv4 address, instead of recreating their applications on a new EC2 instance with no auto assigned public IPv4 address.
As an engineer who regularly uses AWS, I couldn't wait any longer to try it out, so I immediately tested it. I wanted to try it out for myself and experience the excitement
I tried turning on and off IPv4 on EC2
So I quickly tested it
Create an EC2 instance with IPv4
① Enable automatic public IP assignment
② Start the instance
③ Check the instance overview (IPv4 is available)
④ Change the IP address Actions > Networking > Manage IP Addresses
⑤ The much talked about Auto-assign public IP is enabled
⑥ Disable this!!
⑦ Public IP is gone!!!
⑧ Now let's bring it back! Actions > Networking > IP Address Management
⑨ Enable Auto-assign public IP! (There is no public IP address.)
10. Check your public IP again! (And it's changed!)
This completes the verification! Now that charges are being collected via IPv4, we can rest easy knowing that billing will be handled via IPv4
summary
I actually tried reassigning the IPv4 of an instance, and it was a very easy operation. Now you can switch to IPv4 with peace of mind
The IP will change when you re-attach IPv4, so as long as you're careful about that, it should be fine. If you re-link the Elastic IP, everything should be OK. Everyone, please give it a try!!!
5







