some user
some user

Reputation: 1010

AWS EC2 instance - Cannot assign EIP to EC2 instance w/ more than 1 interface

When I try to launch an EC2 instance with 2 interfaces (2 subnets), I get an error and "Auto-assign Public IP" is Disabled.

enter image description here

What is the right way to do it?

Upvotes: 0

Views: 216

Answers (1)

John Rotenstein
John Rotenstein

Reputation: 269520

There are two ways to assign a Public IP address to an Amazon EC2 instance:

  • At startup ("Auto-Assign a Public IP"): This is the option you chose. A public IP address will be assigned. If the instance is stopped and started, the public IP address might change.
  • An Elastic IP Address: The public IP address will remain the same. You can also reassign the address to a different instance. You keep the public IP address until you specifically release it.

Based on your screenshot, it appears that the first option is not a valid means of assigning a public IP address to an instance with multiple network interfaces. Therefore:

  • Launch your instance without a public IP address
  • Create an Elastic IP address
  • Assign the Elastic IP address to one of the interfaces on the Amazon EC2 instance

Upvotes: 3

Related Questions