Why can't I associate Elastic IP with an EC2 instance in the second VPC on AWS?

For a long time, I supported VPC (with 1 subnet) on Amazon Web Services (AWS) with multiple instances, each of which had a Elastic IP address.

For new needs, I defined a second VPC (with 1 subnet) in my account: for some reason, I cannot associate EIP (which has no problems) with instances running in VPC # 2: the interactive console wizard provides only instances of the first VPC.

Is this a known limitation or am I doing something wrong?

+4
source share
1 answer

Two questions:

  • How many EIPs do you have in your account?

  • Is the second VPC using a NAT instance to access the Internet?

EIP addresses should only be used for instances in subnets configured to route their traffic directly to the Internet gateway. EIPs cannot be used for instances on subnets configured to use a NAT instance to access the Internet. (Aws.amazon.com)

+6
source

Source: https://habr.com/ru/post/1394126/


All Articles