Do I need to set a static private IP address for an Amazon EC2 Windows instance?

Last updated: 2020-12-14

I use an Amazon Elastic Compute Cloud (Amazon EC2) Windows instance, and a private IP address is automatically assigned to the instance. Do I need to assign a static IP address to the instance?


In many cases, you don't need to set a static private IP address on am Amazon EC2 Windows instance. However, you might need to use two private IP addresses for your Windows network adapter. To assign a static private IP address for an Amazon EC2 Windows instance, follow these steps:

Note: The network interface IP address and Windows adapter IP addresses must match for a successful network connection.

  1. Open the Amazon EC2 console, and then choose Instances from the navigation pane.
  2. Select your instance. From the Description tab, choose the linked name next to Network interfaces, and then choose the Interface ID.
  3. Choose Actions, and then choose Manage IP Addresses. The primary private IPv4 IP address is already listed.
  4. Choose Assign new IP.
    For Auto-assign, enter a new IP address, and then choose Yes, Update.
    Important: Note the primary private IPv4 address and the new IP address for a later step.
  5. Connect to your Amazon EC2 Windows instance using Remote Desktop Protocol (RDP).
  6. Open Network and Sharing Center, and then choose Change adapter settings.
  7. Open the context (right-click) menu for the network connection, and then choose Properties.
  8. Select Internet Protocol Version 4 (TCP/IPv4), and then choose Properties.
  9. Choose Use the following IP address.
    For IP address, enter the primary private IPv4 address.
    For Subnet mask, enter the network mask for the subnet.
    For Default gateway, enter the gateway for the subnet.
    Choose Advanced.
  10. For IP addresses, choose Add. Enter the new private IP address and subnet mask, and then choose Add.
  11. (Optional) Choose the DNS tab, enter a DNS server address, and then choose OK.
    Note: For more information about finding your VPC DNS server settings, see Amazon DNS server. For information about reserved addresses, see VPC and subnet sizing.

To verify that the new IP address is successfully added, open a command prompt window as administrator and ping both private IP addresses. You should also be able to ping both addresses from another instance in the same subnet.