Explore Courses Blog Tutorials Interview Questions
0 votes
in AWS by (12.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.2k 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.

Related questions

0 votes
1 answer

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer
0 votes
2 answers

Browse Categories