How do I assign a custom primary private IP address to my Amazon EC2 instance?

Last updated: 2020-11-23

How do I assign a custom primary private IP address to my Amazon Elastic Compute Cloud (Amazon EC2) instance?

Short description

You can associate a custom IP address to your Amazon EC2 instance while you configure the instance prior to launch. However, the IP address must be:

  • A valid IPv4 address.
  • In the CIDR range of the chosen subnet.
  • Available. The IP address must not be tied to any other resource

Note: It's not possible to assign a new custom primary private IP address to an existing instance.

Resolution

  1. Configure an Amazon EC2 instance. For detailed steps, see Launching an instance using the launch instance wizard.
  2. In the Configure Instance Details section, for Network, select a virtual private cloud (VPC), or create a new VPC. For Subnet, select the subnet, or create a new subnet where you want to launch your instance.
  3. In the Network interfaces section, for Primary IP, enter the custom private IPv4 address.
  4. Complete the launch instance wizard configurations, and then launch the instance.

Did this article help?


Do you need billing or technical support?