Reputation: 91
My ALB works fine when I add my EC2 targets to its target group. The AWS docs indicate I should be able to attach my ASG to my ALB TG (instead of my instances). When I do this, I get a 503 in my browser even though my SGs are wide open for 80/443: 503 Service Temporarily Unavailable
I confirmed my ASG has 1 instance running, but its Apache log confirms nothing is reaching it. (If I add the EC2 back to the TG, everything works fine again.)
I’m trying to learn how to view my ALB access logs in my s3 bucket, but haven't figured out a way other than to download each file, unzip them, then view them.
When viewing these logs, I am seeing ALB traffic when I include the instance in the TG, but not when I remove the instance from the
TG. Appreciate any suggestions on what to try next. (I would prefer to use the "ALB > TG > ASG > EC2" setup instead of "ALB > TG:port > EC2:port".)
I'm suspecting I haven't set up my ASG correctly? As mentioned earlier, I see my instance is InService and Healthy. I'm wondering, though: With the ASG setup, we don't specify the TG port. If this is the case, which port does the ALB TG use when talking to the ASG? Maybe I need to open up additional ports on my EC2 to accommodate this?
Upvotes: 0
Views: 484
Reputation: 91
I don't think it was sufficient to link my EC2 to my ASG. After forcing ASG to launch it, my ALB began working properly.
Upvotes: 0
Reputation: 179
If you have an instance running in your ASG means, both ASG and launch configuration, are running properly but it can't connect with the ALB.
First, ensure you ALB is pointing to the propper target group configuration, you can see this in the listener configuration of the ALB, the "Rule" configuration should show "Default: forwarding to target_group". Also check, the ALB is listening in the right port.
Then, check the security group assigned to the target group, you need to open the port that the ALB attack, otherwise it won't work.
Finally, check if the target group if binded in the ASG configuration (from the edit ASG option).
Upvotes: 1