0

I would like to know if it is possible for an EC2 instance (both in an operational and non-operational state) to be removed from an ELB by some internal service in AWS without me knowing about this?

I would like to know if this is possible and how I could check if this happened or if I accidentally forgot to add the EC2 instance back to the ELB.

1 Answer 1

0

Since AWS is fully controllable via APIs it's certainly possible to detach instances from an ELB that way. Various Amazon services can do so, such as CloudFormation, Elastic Beanstalk, as well as external automation tools like Terraform, Ansible, etc.

AWS CloudTrail should allow you to see recent API as well as manual actions on your infrastructure. Filter on "Resource type: loadbalancer" or look for "Event Name: DeregisterInstancesFromLoadBalancer"

4
  • Yeah, I know about the APIs... I am wondering if this happened without me knowing because some internal AWS service pulled the EC2 instance out of the ELB--for some reason.
    – user320176
    Mar 13, 2017 at 11:02
  • I've never seen this happen. We've been running 6 ELB's for several years. In fact, I can't remember the last time AWS did something I didn't tell it to. My guess is human error. I just remembered you could use CloudTrail to check recent API calls and changes to your infra. I'll update my answer. Mar 13, 2017 at 11:07
  • It probably was human error. I have configured a CloudWatch alert to ensure that this does not happen again haha
    – user320176
    Mar 13, 2017 at 12:30
  • Pls note AutoScaling can terminate instances automatically too.
    – Putnik
    Mar 13, 2017 at 19:59

You must log in to answer this question.