HAProxy is a free and open source high performance TCP/HTTP load balancer. Keepalived is a free and open source IP failover and takeover soultion for Linux system. This blog post explains how to install HAProxy and Keepalived in AWS to configure high availability.
Although AWS offers its own load balancer (ELB), my preference goes out to HAProxy, since I can configure it entirely the way I would like to. This only requires me to create my own failover system. Luckily we can use Keepalived for that. In this tutorial we will be creating 2 HAProxy EC2 instances. We will turn off the master instance and make sure the second instance takes over.