[Osaka/Yokohama] Looking for infrastructure/server side engineers!

[Osaka/Yokohama] Looking for infrastructure/server side engineers!

[Deployed by over 500 companies] AWS construction, operation, maintenance, and monitoring services

[Deployed by over 500 companies] AWS construction, operation, maintenance, and monitoring services

[Successor to CentOS] AlmaLinux OS server construction/migration service

[Successor to CentOS] AlmaLinux OS server construction/migration service

[For WordPress only] Cloud server “Web Speed”

[For WordPress only] Cloud server “Web Speed”

[Cheap] Website security automatic diagnosis “Quick Scanner”

[Cheap] Website security automatic diagnosis “Quick Scanner”

[Reservation system development] EDISONE customization development service

[Reservation system development] EDISONE customization development service

[Registration of 100 URLs is 0 yen] Website monitoring service “Appmill”

[Registration of 100 URLs is 0 yen] Website monitoring service “Appmill”

[Compatible with over 200 countries] Global eSIM “Beyond SIM”

[Compatible with over 200 countries] Global eSIM “Beyond SIM”

[If you are traveling, business trip, or stationed in China] Chinese SIM service “Choco SIM”

[If you are traveling, business trip, or stationed in China] Chinese SIM service “Choco SIM”

[Global exclusive service] Beyond's MSP in North America and China

[Global exclusive service] Beyond's MSP in North America and China

[YouTube] Beyond official channel “Biyomaru Channel”

[YouTube] Beyond official channel “Biyomaru Channel”

[IPv4] EC2 の IPv4、遂に起動後に変更できるように?

こんにちは。花粉症が今年はましになって happy な ken です。

AWS から先日とても嬉しい発表がありましたので、これはブログを書かなければと思い、早速書いてしまいました。

発表内容

以前、IPv4 も課金対象になるという発表が AWS からきましたね!!これで円安の中、うん??と思う企業さんなども多かったのではと思います。

けれども、IPv4 を外すには EC2 をもう一回 AMI とかから作って切り替えしないとな~~とか思った方も多かったのではないでしょうか。そんな中この発表がありました!!(僕は予想してましたけどね、、、(ふーん噓やろwww(周りの声)))

AWS の発表内容をそのまま引用していますが、簡単にまとめると、EC2 に割り当てられた public IP を外したり付けたりすることが出来るようになりました。つまり、これからは EC2 に間違って IPv4 割り当ててしまっても、もう一度インスタンスを作成し直す手間が省けるということですね。また、逆に IPv4 を付け忘れたので、もう一度作り直す必要も無くなったみたいです。とても嬉しい話です。

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.

● 引用元:https://aws.amazon.com/jp/about-aws/whats-new/2024/04/removing-adding-auto-assigned-public-ipv4-address

AWS を普段から使うエンジニアとして、これは居ても立っても居られなかったので、早速検証しました。実際にやってみて、その感動を体験したかったのです。

EC2 の IPv4 つけたり外したりしてみた

ということで早速検証してみました。

EC2 を IPv4 ありで作成します。

① パブリックIP の自動割り当てを「有効化」してください

② インスタンスを起動します

③ インスタンス概要確認( IPv4 ありますね)

④ IP アドレス変更していきます アクション > ネットワーキング > IP アドレスの管理

⑤ 噂の Auto-assign public IP が有効化なってますね

⑥ これを無効化します!!

⑦ public IP が無くなりました!!!

⑧ 今度は復活させる!アクション > ネットワーキング > IP アドレスの管理

⑨ Auto-assign public IP を有効化!(ちゃんとパブリックIP アドレスも無いですね)

⑩ Public IP 再度確認!!(しかもさっきとIP 変わってますね)

これで検証は終わりです!!IPv4 で料金が取られるようになったので、IPv4 での課金対応もこれで一安心ですね。

まとめ

インスタンスの IPv4 の付け替えを実際に試してみましたが、とても簡単に操作を行えました。これで安心して IPv4 への切り替えもできますね。

IPv4 を再度つけたときにIP が変わってしまうので、その辺りだけ気をつければ、大丈夫そうだなというのが所感です。Elastic IP を再度紐づけしてあげると万事OK というところでしょうか。皆さんも試してみてください!!!

この記事がお役に立てば【 いいね 】のご協力をお願いいたします!
5
読み込み中...
5 票, 平均: 1.00 / 15
186
X facebook はてなブックマーク pocket
[2024.6.30 CentOS support ended] CentOS server migration solution

[2024.6.30 CentOS support ended] CentOS server migration solution

[2025.6.30 Amazon Linux 2 support ended] Amazon Linux server migration solution

[2025.6.30 Amazon Linux 2 support ended] Amazon Linux server migration solution

[Osaka/Yokohama] Actively recruiting infrastructure engineers and server side engineers!

[Osaka/Yokohama] Actively recruiting infrastructure engineers and server side engineers!

The person who wrote this article

About the author

Ken

Joined Beyond as a new graduate in 2022.Currently works
in the System Solutions Department.I
studied linguistics until graduate school and took on the challenge of becoming an infrastructure engineer.I
established an in-house club called the Beyond Cafe Club, and am passionate about making coffee and tea every day. ing