Creating an Application load balancer for the VPC

 1. Create a VPC


2. Create Subnets (Two public subnets and two private subnets).


3. Create an Internet gateway and attach it to the VPC created.


4. Create a NAT gateway with a private subnet created.


5. Create a route table for public subnets, edit the subnet associations and routes.


6. Create a route table for private subnets and edit the subnet associations and routes.


7. Now we have to launch EC2 instances for each public and private subnets. Add proper vpc and subnet, plus create a security policy.



8. Navigate to advanced settings and add following commands in user data


9. Repeat the above steps to create second instance as well.


10. Create a load balancer.

11. In security groups tab click on create new a add the following inbound rules


12. Now choose this security group in the load balancer tab In listeners and routing section create a new target group and add the ec2s previously created into the target group leave the group details section as such and proceed to register targets.



13.  add the new security group we have created to the ec-2 to security group that was created earlier


14. Navigate to load balancer tab and copy the DNS name, paste the URL in a new tab


15. You will notice the following website with the following pages after successive reloads now we can confirm that our load balancer is working as expected



































Comments

Popular posts from this blog

Creating a VPC Network

Network Virtualization

EC2 Instance accessible via remote client