Modules affected
aws-wrapper.sh
Description
- Added a new
aws_wrapper_get_asg_rally_point
function that can calculate a "rally point" instance in an Auto Scaling Group (ASG) and return its hostname. This is a deterministic way for the instances in an ASG to all pick the same single instance to perform some action: e.g., this instance could become the leader in a cluster or run some initialization script that should only be run once for the entire ASG. Under the hood, this method picks the instance in the ASG with the earliest launch time; in the case of ties, the instance with the earliest instance ID (lexicographically) is returned.
Special thanks
- Thank you to @yardbirdsax for the contribution!