Your internal load balancer must have a private subnet

Viewed 1429

I want to create an internal NLB on AWS to two EC2 instances in two AZs/subnets.

Configuration: 1 VPC, two AZs , 2 private and 2 public subnets:

AZ eu-central-1a eu-central-1b
public subnet public 1 public 2
private subnet private 1A private 2A

The EC2 instances are located in the private subnets.

Under Mappings/eu-central-1a I can select public 1 or private 1A. Under Mappings/eu-central-1b there's only public 2 and the error message:

Your internal load balancer must have a private subnet. 
You can update the subnet’s route table in the VPC Console

The private networks and their route tables look identical. Not sure, what else needs to be done.

2 Answers

I used AWS CLI meanwhile. That solved the problem.

# aws elbv2 create-load-balancer --type network --name my-load-balancer --subnets subnet-07.......9528 subnet-0a..........5170 --scheme internal

To solve this issue, remove the internet gateway from the route table of the private subnets if they exist there.

Related