0 votes
1 view
in AWS by (8.9k points)
edited by

If I just add the private subnet to the ELB, it will not get any connections.

If I attach both subnets to the ELB then it can access the instances, but it often will get time-outs. (Refer Screenshot 1)

If I attach to only public subnet then my instance attached to ELB gets OutOfService because I do not have any instance in the Public Subnet, instance count shows 0. (Refer Screenshot 2)

Screenshot 1: Both subnets attached Both subnets attached

Screenshot 2: Only public subnet attached Only public subnet attached

My instance attached to ELB gets OutOfService. I have even tried with allowing ports in the Security Groups for EC2 instances and ELB, but it did not help.

Please help, I am breaking my head with this.

1 Answer

0 votes
by (18.5k points)

Make sure what you are doing aligns with the following configuration settings:

  • The routing table of private subnet should route to a NAT gateway which is in Public subnet
  • The routing table of public subnet should route to Internet Gateway attached to your VPC.
  • Make sure that the security group of your autoscaling groups allows access to the security group of your load balancer.
  • Make sure you have attached only public subnets to your ELB.
  • The health checks on the instances should be working locally.
Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...