1 Answer
- Newest
- Most votes
- Most comments
1
Hi,
AWS ELB can automatically replace instances that it detects as unhealthy:
By default, Amazon EC2 Auto Scaling ignores the results of the Elastic Load Balancing
health checks. However, you can enable these health checks for your Auto Scaling group.
After you do this, when Elastic Load Balancing reports a registered instance as Unhealthy,
Amazon EC2 Auto Scaling marks the instance Unhealthy on its next periodic health check
and replaces it.
So, read the source page of this paragraph in details at: https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-health-checks.html
See, you may need to update your config to avoid automatic replacement of unhealthy instances.
Best,
Didier
Relevant content
- Accepted Answerasked 9 months ago
- AWS OFFICIALUpdated a month ago
- AWS OFFICIALUpdated a month ago
- AWS OFFICIALUpdated 10 months ago
Thank you for looking into my issue. I checked the link you provided and that guided me as to what to know further. When I checked the reason in Auto Scaling Group, this is what I see "...an instance was taken out of service in response to a difference between desired and actual capacity, shrinking the capacity from 2 to 1." I think the Auto Scaling just behaved normal because when I was creating VPC, I chose 2 availability zones and that prompted me to create 2 EC2 instances. In my scaling configuration, I chose 1 to 4 instances. Then when I was setting up my WordPress that might triggered an event and might captured the CloudWatch and then Auto Scaling Group just did his job to scale down due to low CPU utilization. I'm new to AWS so that caused me a confusion. Thank you guys for all your help.