1. Launch second EC2 instance
Naming the first EC2 instance Web Server 1
Click Action / Image & templates / Launch more like this
Try to access the website by using the public IP address
2. Create an Elastic LB
On the EC2 dashboard, click on Load Balancers / Click Create Load Balancer
Enter the name of the ELB. Eg: elb-demo
Click Next: Configure Security Settings
Click Next: Configure Security Groups
Click Select an existing security group / Your default security group / Click Next: Configure Routing
Configure Target Group
Name: demo-tg
Select two EC2 instances and click Add to registered
Copy DNS Name and try to open from your web browser
Basic website with local hostname on the content by using userdata.
It is randomly to switch between two EC2 instances.
Targets
Congratulations! You have created the Elastic Load Balancer successfully.