HTTP code 302 is a redirect - it would seem that the load balancer is reaching the instance but the web server is responding by telling the ALB to go somewhere else. For example, it could be that your health check path is
/ but when you access that the web server redirects to
/index.html - in a browser you'd barely see this but the ALB won't follow a redirect, it expects a 200 response to show the back-end as healthy.
Also: Generally, you'd assign the instance to a target group and then point the ALB to that target group - no IP addresses required to be specific. It doesn't matter if the instance has an Elastic IP or not. Again, generally, the instance would not have an Internet-reachable IP address because only the ALB really needs to communicate with it - so only having a private IP address is totally fine.
ApiGateway to control an EC2 instance with load balancer running a FastAPIAccepted Answerasked 8 months ago
Need help ! Issue with Auto Scaling for Application Load Balancer with 2 different instances for target groupsasked 2 months ago
Application Load Balancer : external IP outside VPC ?asked 5 months ago
Application Load Balancer & AZ routingAccepted Answerasked a year ago
Cannot select a target group with alb target type when creating an application load balancerAccepted Answerasked 5 months ago
What is the main differences between an load balancer and a autoscaling groupAccepted Answerasked 4 months ago
Application Load balancer with ECSAccepted Answerasked a month ago
Load balancer HTTPS to EC2 instance through HTTPasked 3 years ago
Application Load Balancer for EC2 instance with Elastic IPasked 10 months ago
504 Gateway Time-out when setting up Application Load Balancerasked 10 months ago