skip to Main Content

I am pretty new to AWS

I have a Golang app deployed on Elasticbeanstalk. All worked fine when it was a single instance app, without using load balancing.

However, when I introduce a load balancer, I cannot access a website at all.

The app is running on port 8080.

Here is my elastic beanstalk listeners configuration

enter image description here

Also, here is ALB configuration:

enter image description here

Target group health check fails with Request timeout. It’s configured to route / which should work.

Security groups should be fine, I’ve create inbound rules for ports 5432 (need it for postgres), 8080 etc. All worked fine on single instance environment

Now, I am not able to access my app via port 8080 (nor via 80 nor via 443 – ssl), of course not via custom domain

I did not include details of certificate and custom domain on purpose, wanted to isolate this problem

What can be an issue and how can I debug this?

2

Answers


  1. Chosen as BEST ANSWER

    Issue is resolved

    There were wrong subnets specified on Elasticbeanstalk

    When I created min 1, max 2 instances and specified 2 subnets in 2 availability zones, all started working fine

    There was no issue in Security groups nor Targets

    Thanks for help!


  2. As the Target Group Health check is failing with Request timeout, this could be a Security Group issue.

    Check the Security Group rules attached to EC2 Instances and ELB and ensure that ELB can connect to the EC2 instance.

    • ELB Security Group needs an Outbound rule for port 8080 to the VPC range or the Security Group attached to EC2 instances.
    • EC2 Security Group needs an Inbound rule for port 8080 to the VPC range or SecurityGroup attached to ELB.

    You can refer here for more detailed instructions under Target.Timeout section.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search