AWS Security ChangesHomeSearch

AWS AWSEC2 documentation change

Service: AWSEC2 · 2025-04-16 · Documentation low

File: AWSEC2/latest/UserGuide/managing-network-interface-ip-addresses.md

Summary

Restructured documentation to separate console, AWS CLI, and PowerShell instructions. Added detailed CLI/PowerShell command examples for managing IPv4/IPv6 addresses and Elastic IP associations. Clarified primary IPv6 address assignment constraints.

Security assessment

Changes focus on improving operational documentation clarity and adding command examples. No mention of vulnerabilities, exploits, or security patches. While IP management can impact security posture, these changes represent routine documentation improvements rather than addressing specific security issues.

Diff

diff --git a/AWSEC2/latest/UserGuide/managing-network-interface-ip-addresses.md b/AWSEC2/latest/UserGuide/managing-network-interface-ip-addresses.md
index fb8bcf366..0838ced2d 100644
--- a//AWSEC2/latest/UserGuide/managing-network-interface-ip-addresses.md
+++ b//AWSEC2/latest/UserGuide/managing-network-interface-ip-addresses.md
@@ -18 +18,4 @@ You can manage the following IP addresses for your network interfaces:
-###### To manage the Elastic IP addresses of a network interface using the console
+Console
+    
+
+###### To manage the IP addresses of a network interface
@@ -26 +29,17 @@ You can manage the following IP addresses for your network interfaces:
-  4. To associate an Elastic IP address, do the following:
+  4. To manage the IPv4 and IPv6 addresses, do the following:
+
+    1. Choose **Actions** , **Manage IP addresses**.
+
+    2. Expand the network interface.
+
+    3. For **IPv4 addresses** , edit the IP addresses as needed. To assign an additional IPv4 address, choose **Assign new IP address** and then specify an IPv4 address from the subnet range or let AWS choose one for you.
+
+    4. (Dual stack or IPv6 only) For **IPv6 addresses** , edit the IP addresses as needed. To assign an additional IPv6 address, choose **Assign new IP address** and then specify an IPv6 address from the subnet range or let AWS choose one for you.
+
+    5. To assign or unassign a public IPv4 address to a network interface, choose **Auto-assign public IP**. You can enable or disable this for any network interface, but it only affects the primary network interface.
+
+    6. (Dual stack or IPv6-only) For **Assign primary IPv6 IP** , choose **Enable** to assign a primary IPv6 address. The first GUA associated with the network interface is chosen as the primary IPv6 address. After you assign a primary IPv6 address, you can't change it. This address is the primary IPv6 address until the instance is terminated or the network interface is detached.
+
+    7. Choose **Save**.
+
+  5. To associate an Elastic IP address, do the following:
@@ -38 +57 @@ You can manage the following IP addresses for your network interfaces:
-  5. To disassociate an Elastic IP address, do the following:
+  6. To disassociate an Elastic IP address, do the following:
@@ -49 +68 @@ You can manage the following IP addresses for your network interfaces:
-###### To manage the IPv4 and IPv6 addresses of a network interface using the console
+AWS CLI
@@ -51 +69,0 @@ You can manage the following IP addresses for your network interfaces:
-  1. Open the Amazon EC2 console at [https://console.aws.amazon.com/ec2/](https://console.aws.amazon.com/ec2/).
@@ -53 +71,33 @@ You can manage the following IP addresses for your network interfaces:
-  2. In the navigation pane, choose **Network Interfaces**.
+###### To manage the IPv4 addresses
+
+Use the following [assign-private-ip-addresses](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/assign-private-ip-addresses.html) command to assign an IPv4 address.
+    
+    
+    aws ec2 assign-private-ip-addresses \
+        --network-interface-id eni-1234567890abcdef0 \
+        --private-ip-addresses 10.0.0.82
+
+Use the following [unassign-private-ip-addresses](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/unassign-private-ip-addresses.html) command to unassign an IPv4 address.
+    
+    
+    aws ec2 unassign-private-ip-addresses \
+        --network-interface-id eni-1234567890abcdef0 \
+        --private-ip-addresses 10.0.0.82
+
+###### To manage the IPv6 addresses
+
+Use the following [assign-ipv6-addresses](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/assign-ipv6-addresses.html) command to assign an IPv6 address.
+    
+    
+    aws ec2 assign-ipv6-addresses \
+        --network-interface-id eni-1234567890abcdef0 \
+        --ipv6-addresses 2001:db8:1234:1a00:9691:9503:25ad:1761
+
+Use the following [unassign-ipv6-addresses](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/unassign-ipv6-addresses.html) command to unassign an IPv6 address.
+    
+    
+    aws ec2 unassign-ipv6-addresses \
+        --network-interface-id eni-1234567890abcdef0 \
+        --ipv6-addresses 2001:db8:1234:1a00:9691:9503:25ad:1761
+
+###### To manage the Elastic IP address for the primary private IPv4 address
@@ -55 +105 @@ You can manage the following IP addresses for your network interfaces:
-  3. Select the network interface.
+Use the following [associate-address](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/associate-address.html) command to associate an Elastic IP address with the primary private IPv4 address.
@@ -57 +106,0 @@ You can manage the following IP addresses for your network interfaces:
-  4. Choose **Actions** , **Manage IP addresses**.
@@ -59 +108,3 @@ You can manage the following IP addresses for your network interfaces:
-  5. Expand the network interface.
+    aws ec2 associate-address \
+        --allocation-id eipalloc-0b263919b6EXAMPLE \
+        --network-interface-id eni-1234567890abcdef0
@@ -61 +112 @@ You can manage the following IP addresses for your network interfaces:
-  6. For **IPv4 addresses** , modify the IP addresses as needed. To assign an IPv4 address, choose **Assign new IP address** and then specify an IPv4 address from the subnet range or let AWS choose one for you. To unassign an IPv4 address, choose **Unassign** next to the address.
+Use the following [disassociate-address](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/disassociate-address.html) command to disassociate an Elastic IP address from the primary private IPv4 address.
@@ -63 +113,0 @@ You can manage the following IP addresses for your network interfaces:
-  7. To assign or unassign a public IPv4 address to a network interface, choose **Auto-assign public IP**. This option can be enabled or disabled for any network interface but will only apply to the primary network interface (for example, eth0).
@@ -65 +115 @@ You can manage the following IP addresses for your network interfaces:
-  8. For **IPv6 addresses** , modify the IP addresses as needed. To assign an IPv6 address, choose **Assign new IP address** and then specify an IPv6 address from the subnet range or let AWS choose one for you. To unassign an IPv6 address, choose **Unassign** next to the address.
+    aws ec2 disassociate-address --association-id eipassoc-2bebb745a1EXAMPLE
@@ -67 +117 @@ You can manage the following IP addresses for your network interfaces:
-  9. (Optional) If your modifying a network interface in a dual-stack or IPv6-only subnet, you have the option to **Assign Primary IPv6 IP**. Assigning a primary IPv6 address enables you to avoid disrupting traffic to instances or ENIs. Choose **Enable** if the instance that this ENI will be attached to relies on its IPv6 address not changing. AWS will automatically assign an IPv6 address associated with the ENI attached to your instance to be the primary IPv6 address. Once you enable an IPv6 GUA address to be a primary IPv6, you can't disable it. When you enable an IPv6 GUA address to be a primary IPv6, the first IPv6 GUA will be made the primary IPv6 address until the instance is terminated or the network interface is detached. If you have multiple IPv6 addresses associated with an ENI attached to your instance and you enable a primary IPv6 address, the first IPv6 GUA address associated with the ENI becomes the primary IPv6 address.
+PowerShell
@@ -69 +118,0 @@ You can manage the following IP addresses for your network interfaces:
-  10. Choose **Save**.
@@ -70,0 +120 @@ You can manage the following IP addresses for your network interfaces:
+###### To manage the IPv4 addresses
@@ -71,0 +122 @@ You can manage the following IP addresses for your network interfaces:
+Use the following [Register-EC2PrivateIpAddress](https://docs.aws.amazon.com/powershell/latest/reference/items/Register-EC2PrivateIpAddress.html) cmdlet to assign an IPv4 address.
@@ -74 +125,3 @@ You can manage the following IP addresses for your network interfaces:
-###### To manage the IP addresses of a network interface using the AWS CLI
+    Register-EC2PrivateIpAddress `
+        -NetworkInterfaceId eni-1234567890abcdef0 `
+        -PrivateIpAddress 10.0.0.82
@@ -76 +129 @@ You can manage the following IP addresses for your network interfaces:
-You can use one of the following commands. For more information about these command line interfaces, see [Access Amazon EC2](./concepts.html#access-ec2).
+Use the following [Unregister-EC2PrivateIpAddress](https://docs.aws.amazon.com/powershell/latest/reference/items/Unregister-EC2PrivateIpAddress.html) cmdlet to unassign an IPv4 address.
@@ -78 +130,0 @@ You can use one of the following commands. For more information about these comm
-  * [assign-ipv6-addresses](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/assign-ipv6-addresses.html)
@@ -80 +132,3 @@ You can use one of the following commands. For more information about these comm
-  * [associate-address](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/associate-address.html)
+    Unregister-EC2PrivateIpAddress `
+        -NetworkInterfaceId eni-1234567890abcdef0 `
+        -PrivateIpAddress 10.0.0.82
@@ -82 +136 @@ You can use one of the following commands. For more information about these comm
-  * [disassociate-address](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/disassociate-address.html)
+###### To manage the IPv6 addresses
@@ -84 +138 @@ You can use one of the following commands. For more information about these comm
-  * [unassign-ipv6-addresses](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/unassign-ipv6-addresses.html)
+Use the following [Register-EC2Ipv6AddressList](https://docs.aws.amazon.com/powershell/latest/reference/items/Register-EC2Ipv6AddressList.html) cmdlet to assign an IPv6 address.
@@ -86,0 +141,3 @@ You can use one of the following commands. For more information about these comm
+    Register-EC2Ipv6AddressList `
+        -NetworkInterfaceId eni-1234567890abcdef0 `
+        -Ipv6Address 2001:db8:1234:1a00:9691:9503:25ad:1761
@@ -87,0 +145 @@ You can use one of the following commands. For more information about these comm
+Use the following [Unregister-EC2Ipv6AddressList](https://docs.aws.amazon.com/powershell/latest/reference/items/Unregister-EC2Ipv6AddressList.html) cmdlet to unassign an IPv6 address.
@@ -89 +146,0 @@ You can use one of the following commands. For more information about these comm
-###### To manage the IP addresses of a network interface using the Tools for Windows PowerShell
@@ -91 +148,3 @@ You can use one of the following commands. For more information about these comm
-You can use one of the following commands.
+    Unregister-EC2Ipv6AddressList `
+        -NetworkInterfaceId eni-1234567890abcdef0 `
+        -Ipv6Address 2001:db8:1234:1a00:9691:9503:25ad:1761
@@ -93 +152 @@ You can use one of the following commands.
-  * [Register-EC2Address](https://docs.aws.amazon.com/powershell/latest/reference/items/Register-EC2Address.html)
+###### To manage the Elastic IP address for the primary private IPv4 address
@@ -95 +154 @@ You can use one of the following commands.
-  * [Register-EC2Ipv6AddressList](https://docs.aws.amazon.com/powershell/latest/reference/items/Register-EC2Ipv6AddressList.html)
+Use the following [Register-EC2Address](https://docs.aws.amazon.com/powershell/latest/reference/items/Register-EC2Address.html) cmdlet to associate an Elastic IP address with the primary private IPv4 address.
@@ -97 +155,0 @@ You can use one of the following commands.
-  * [Unregister-EC2Address](https://docs.aws.amazon.com/powershell/latest/reference/items/Unregister-EC2Address.html)
@@ -99 +157,3 @@ You can use one of the following commands.
-  * [Unregister-EC2Ipv6AddressList](https://docs.aws.amazon.com/powershell/latest/reference/items/Unregister-EC2Ipv6AddressList.html)
+    Register-EC2Address `
+        -NetworkInterfaceId eni-1234567890abcdef0 `
+        -AllocationId eipalloc-0b263919b6EXAMPLE
@@ -100,0 +161 @@ You can use one of the following commands.
+Use the following [Unregister-EC2Address](https://docs.aws.amazon.com/powershell/latest/reference/items/Unregister-EC2Address.html) cmdlet to disassociate an Elastic IP address from the primary private IPv4 address.
@@ -102,0 +164 @@ You can use one of the following commands.
+    Unregister-EC2Address -AssociationId eipassoc-2bebb745a1EXAMPLE