[IPv4] EC2's IPv4 can finally be changed after startup?
Hello. Ken is happy that his hay fever has improved this year.
There was a very exciting announcement from AWS the other day, so I thought I should write a blog about it, so I did so right away.
Presentation content
Previously, AWS announced that IPv4 will also be subject to billing! ! Now that the yen is weak, yeah? ? I think there are many companies that think so.
However, many people may have thought that in order to remove IPv4, they would have to create EC2 from an AMI again and switch. Meanwhile, this announcement was made! ! (I expected that...(Hmm, you're kidding lol (voices from people around you)))
I'm quoting exactly what AWS announced, but to summarize it simply, it's now possible to remove or add a public IP assigned to EC2. In other words, from now on, even if he accidentally assigns IPv4 to EC2, he won't have to create an instance again. Also, since I forgot to add IPv4, there seems to be no need to create it again. This is a very happy story.
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 efficient 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 stand this, so I immediately tested it. I wanted to try it out and experience the excitement.
I tried turning on and off IPv4 on EC2.
So I quickly tested it.
Create EC2 with IPv4.
① “Enable” automatic public IP assignment
② Start the instance
③ Check the instance summary (IPv4 is available)
④ Change the IP address Action > Networking > Manage IP address
⑤ The rumored Auto-assign public IP has been enabled.
⑥ Disable this! !
⑦ Public IP is gone! ! !
⑧ Let's revive it this time! Actions > Networking > Manage IP addresses
⑨ Enable Auto-assign public IP! (There's no public IP address either.)
⑩ Public IP Check again! ! (And the IP has changed since then.)
The verification is now complete! ! Now that IPv4 fees are being charged, it's a relief to be able to support IPv4 billing.
summary
I actually tried changing the IPv4 of an instance, and it was very easy to do. Now you can switch to her IPv4 with peace of mind.
The IP will change when you re-enable IPv4, so my feeling is that as long as you are careful about that, you should be fine. I guess everything will be OK if I link the Elastic IP again. Everyone please try it! ! !