title: AWS Load balancer health check: Health checks failed with these codes: [301]
body: <p>I'm trying to set up an Elastic Beanstalk environment with an application load balancer and a dockerized app. When creating the EB environment, I set it in a VPC - the load balancer went into a public subnet and the EC2 instance went into a private subnet. There's a NAT gateway that the LB's subnet is attached to. The load balancer was created as an application load balancer, with a listener for ports 80 and 443 (using a self-signed certificate uploaded into ACM).</p>
  
  <p>I launched the EB environment with a default sample app that AWS provides. When I do this, my load balancer target check is healthy. However, when I deploy my actual app into the EB environment, the load balancer target check starts to fail with the error code 301. I'm at a loss of what to do or how to figure out what's going wrong. If I redeploy the sample application the target check still remains as a failure.</p>
  
  <p>Edit:</p>
  
  <p>I tried accessing my app via the EB url, and Chrome errored out with a too many redirects error. Is this related?</p>