How to create Load Balancer in AWS — Amazon Web Services?

Vikas Kohli
3 min readJan 24, 2023

--

Firstly log in to your Amazon AWS Account, then go to Load Balancer or you can search load balancer and click on the link, you’ll see the below screen.

Create Load Balancer

Now, we select the Load Balancer Type that we need to create. I have chosen Application Load Balancer and explain the same in this section

Select Load Balancer Type

After selecting, we configure load balancers(set name and listeners). For SSL, we just need to add HTTPS protocol with 443 port(default port for HTTPS)

Step 1 Listener

Now we need to set up the availability zones. Like I have my application in India so I have chosen regions ap-south-1a to ap-south1c which will reduce the time if our users hit the load balancer URL from India(its basically called latency time)

Set Availablity zones

If we choose HTTPSlistener, we need to attach a certificate for that also. AWS provides it for free but for that, we need to configure and create the certificate in ACM (Amazon Certificate Manager) and then select the security policy.

Set Certificate

After that configure the security groupslike which port we need to use we can add that. Better to use only the ports which we need to use

Set Security Group

After configuring the security group details, now we need to addRouting , it means we need to add a route(it means it will redirected to that route whenever from the app/website sit hit that load balancer URL)

Set Routing

Now after configuring the route, we need to register the target in the route. Here I have added more than 1 instance where that server is running. Currently, we’re doing Loadbalancer for API, so I have added all the instances(suppose I have running NodeJs services and it's running on two different servers, then I need to add all 2 instances in the registered target). Also if we’re using AWS Auto Scaling then we need to bind only AWS Auto Scaling.

*Note:- As we’re running Nodejs in some port(assume it is 3000, then I will add that port in the registered target)

Register Target on Port

Review all your details, once all steps are followed.

Review

Now you have successfully created a load balancer in AWS.

FOR the ACM certificate, I’ll write a different article.

Have a nice day ☺

--

--

Vikas Kohli
Vikas Kohli

Written by Vikas Kohli

B.E Software Developer, Enthusiastic, Ego-surfing

No responses yet