The configuration for the Auto Scaling Group only utilises EC2 Health Checks. When leaving the lab running over for a few days noticed that 502 errors were returned in the HTML site. tracking down the problem the ALB had the two backing EC2 instances marked as 'unhealthy' and therefore were not routing traffic. However they remained in the Autoscale pool as they were marked as Healthy by the EC2 health check (rather than the defined ALB Health Check /health.html).
Suggest updating the Cloudformation to configure the Auto Scaling Groups HealthCheckType to use ELB health checks.
The configuration for the Auto Scaling Group only utilises EC2 Health Checks. When leaving the lab running over for a few days noticed that 502 errors were returned in the HTML site. tracking down the problem the ALB had the two backing EC2 instances marked as 'unhealthy' and therefore were not routing traffic. However they remained in the Autoscale pool as they were marked as Healthy by the EC2 health check (rather than the defined ALB Health Check /health.html).
Suggest updating the Cloudformation to configure the Auto Scaling Groups
HealthCheckType
to use ELB health checks.