title: AWS NLB in public subnets with EC2 in private subnets
body: <p>Has someone configured a NLB in the public subnets of your VPC to route traffic to EC2 instances that are in the private subnets?</p>
  
  <p>When using an ELB, a good solution is to create a Security Group for the ELB and then create another SecurityGroup for the private EC2 Instances, allowing incoming traffic from that ELB Security Group, as explained here:</p>
  
  <p><a href="https://aws.amazon.com/premiumsupport/knowledge-center/public-load-balancer-private-ec2/" rel="noreferrer">https://aws.amazon.com/premiumsupport/knowledge-center/public-load-balancer-private-ec2/</a></p>
  
  <p>"You can also add a rule on the instance’s security group to allow traffic from the security group assigned to the load balancer. For example, if the security group on the load balancer is sg-1234567a, make the following changes on the security group associated with the private instances"</p>
  
  <p>Since you cannot associate a Security Group to a NLB, how could you accomplish this with the same type of security?</p>
  
  <p>Thanks!</p>