Certified CloudOPS LAB: Setting up an ALB with two paths for Load Distribution issue with last part of the lab

Hi everyone I am doing the following lab and I am finding issues with validating the applications, I am able to create all of the terraform and configure the ALB with requested settings, but when trying to curl I am getting bad gateway.

Setting up an ALB with two paths for Load Distribution

This is the ALB config

The trouble I see is that the target group checks dont look healthy.

Any advice will be appreciated.

A link to the lab would help, however you need to find out why the TG thinks the target instance isn’t healthy. The load balancer will certainly return 502 if it has no TG with any healthy targets.

From the screenshot, the instance should be serving an application on port 8080. Can you curl port 8080 on the instance’s private IP directly from a cloudshell terminal?

  • If no, then there is something wrong with how the app on the instance is deployed, and the healthcheck is working correctly.
  • If yes, then the error is in your listener or healthcheck rules.

Hi Alistair this is the link to the lab.

https://learn.kodekloud.com/user/courses/aws-certified-sysops-administrator-associate/module/1b592900-bdef-468a-9a2b-de667b7e9cae/lesson/3b006a5f-48af-4cc0-a465-bfc967f40e6f

I will try to curl from the cloud shell and let you know how it goes thanks.

Hi I tried to connect to the instance and I cannot ssh from lab consolo or using ec2 to check if the app1 or app2 servers are servicing. However I managed to get a different message this time.

Trying to connect from here

This is the result of trying

As these vms are terraformed not sure what are the creds to connect anyway. Usually connecting from the console with the key pairs already configured is transparent.

Thanks