GreenfieldTech / lambda-route53-updates

Java AWS Lambda package that receives notifications to update Route53 records
http://www.greenfieldtech.net/open-source/
GNU Lesser General Public License v2.1
2 stars 1 forks source link

When an instance is shutdown manually, its IP address stays in the Route53 RR set #1

Open guss77 opened 6 years ago

guss77 commented 6 years ago

If an admin manually terminates an instance, i.e. not by decrementing the autoscaling group "desired" field, then when the ASG notices the machine is no longer available and start performing the "terminating" life cycle action, the instance no longer has an IP.

As a result, the lambda-route53-updates can't figure out which IP to remove from the RR set and the old IP stays in Route53.

guss77 commented 6 years ago

We should handle such cases by rescanning the ASG and replacing the entire RR set with the list of IPs of "inservice" instances from the ASG.