'Your internal load balancer must have a private subnet

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.



Solution 1:[1]

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

Solution 2:[2]

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

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 jpsstack
Solution 2 Olufemi Israel Olanipekun