Recently I've had a need to pick a leader instance when using AWS EC2 Auto Scaling. To solve this problem I've created ec2_election. Benefits...
Serverless: All functionality is contained within an AWS Lambda function. This means you don't need to deal with operations.
Easy to modify: All of the code is written in simple Python 2.7 since this is directly supported by AWS Lambda. The Boto3 SDK is used since it too is directly supported by AWS and included in AWS Lambda.
Self healing: AWS Cloudwatch scheduled events or EC2 Auto Scaling events are used to trigger the Lambda function. Once setup, ec2_election will continuously respond to events and elect a new leader as necessary.