What Is Elastic Load Balancing?
Elastic Load Balancing automatically distributes incoming traffic across multiple EC2 instances. we can create a load balancer and register instances with the load balancer in one or more Availability Zones. The load balancer serves as a single point of contact for clients. This enables you to increase the availability of your application. we can add and remove EC2 instances from your load balancer as our needs change, without disrupting the overall flow of information. If an EC2 instance fails, Elastic Load Balancing automatically reroutes the traffic to the remaining running EC2 instances(Ref-From AWS).
Please do the following setups to create load balancer and then add at least two EC2 instances .
Commands(connect to one of the ec2 instances):
ssh -i /path/my-key-pair.pem firstname.lastname@example.org
/path/my-key-pair.pem - is where key is located
ec2-user - user name
Then go into htdocs or your root directory and do the deployment . after finish that do r-sync to other EC2 instance . ex: rsync -i /path/my-key-pair2.pem -avz –exclude app/config/database.php –exclude app/routes.php –exclude app/storage /mnt/www/mybitbucket_bkp/ email@example.com:/mnt/www/my_dev_store/ then please change the configuration to the newly updated server