Select Language:
If you’re working on securing an application on AWS and facing issues with your setup, here’s a straightforward approach to troubleshoot and fix the problem.
First, ensure that your EC2 instance is properly configured in a private subnet with the correct security group settings. The security group should allow inbound traffic from the Application Load Balancer (ALB). Double-check that the security group attached to your EC2 instance permits traffic only from the ALB’s security group or specific IP ranges associated with the ALB.
Next, look at your load balancer’s target group. If the targets are marked as unhealthy, the ALB won’t be able to route traffic to your instance. To fix this, verify that the security group of your EC2 instance allows traffic from the ALB’s security group on the relevant port. Also, confirm that your application is listening on the correct port and that it is responding properly.
It’s important to check the health check configuration for your target group. Make sure the health check path is correct, and that the security settings and network configuration allow the ALB to perform these health checks successfully. If the health check fails repeatedly, AWS marks the target as unhealthy.
Another thing to review is the network ACLs in your VPC. Especially in private subnets, network ACLs should not block the traffic between the ALB and your EC2 instance.
Finally, if you can SSH into your private EC2 instance through the bastion host but still can’t access your application via the ALB DNS name, it indicates that the issue is likely on the load balancer or network settings, not with the EC2 setup itself.
By ensuring the security groups, target group health check settings, and network ACLs are properly configured, you should be able to resolve the unhealthy target status and access your application through the ALB DNS.





