aws-samples / aws-saas-factory-serverless-workshop

MIT No Attribution
135 stars 63 forks source link

Autoscale Health Check doesn't utilise ELB checks #35

Open bluedoors opened 2 years ago

bluedoors commented 2 years ago

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.