- Newest
- Most votes
- Most comments
Or you could follow this walk-through to find out what was the step you missed. https://docs.aws.amazon.com/autoscaling/ec2/userguide/tutorial-ec2-auto-scaling-load-balancer.html
If you added some manually created instances to target groups and those are working fine vs auto scaling instances failing the status check, it could be that have manually started your webserver, or done some other changes that are not included in the AMI, so instances created from launch template are different from ones you created manually?
Hi. This article will help you.
https://repost.aws/knowledge-center/elb-fix-failing-health-checks-alb
Assuming your launch template doesn't have problem, check the following, in particular.
- ELB health check path
- 2 Public subnets route table and network acl(if configured)
https://docs.aws.amazon.com/autoscaling/ec2/userguide/ts-as-healthchecks.html
EC2 instance status check failure: If there are issues that cause Amazon EC2 to consider the instances in your Auto Scaling group impaired, Amazon EC2 Auto Scaling automatically replaces the impaired instances as part of its health check. To address this issue, you can manually create an Amazon EC2 instance that is not part of the Auto Scaling group and investigate the problem. After you confirm that your instance launched successfully and is healthy, deploy a new, error-free instance configuration to the Auto Scaling group.
EC2 scheduled reboot: Auto Scaling instances are replaced when a scheduled event indicates a problem with the instance. If you do not want instances to be replaced due to a scheduled event, you can suspend the health check process for an Auto Scaling group.
EC2 health check indicating that the instance has been terminated or stopped: Auto Scaling instances that have been stopped, rebooted, or terminated are replaced. If a health check fails because a user manually stopped, rebooted, or terminated the instance, this is due to how Amazon EC2 Auto Scaling health checks work. The instance must be healthy and reachable. If you need to reboot the instances in your Auto Scaling group, AWS recommends that you put the instances on standby first.
ELB system health check failure: Auto Scaling instances might pass the EC2 status checks, but they might fail the Elastic Load Balancing health checks for the target groups or Classic Load Balancers with which the Auto Scaling group is registered. An instance might fail the Elastic Load Balancing health check because an application running on the instance has issues that cause the load balancer to consider the instance out of service. To pass the Elastic Load Balancing health checks, you should verify several settings, including the success codes that the load balancer is expecting, the security groups for your load balancer and Auto Scaling group, and the health check settings of your target groups.
It's also worth mentioning that you can be notified when Amazon EC2 Auto Scaling terminates the instances in your Auto Scaling group, including when the cause of instance termination is not the result of a scaling activity. For more information, see the Get Amazon SNS notifications (https://docs.aws.amazon.com/autoscaling/ec2/userguide/GettingStartedTutorial.html#gs-lc-hook) when your Auto Scaling group scales guide on AWS' official documentation.
Relevant content
- Accepted Answerasked 5 years ago
- asked 4 months ago
- asked 5 months ago
- AWS OFFICIALUpdated 4 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 10 months ago