ALB-tutorial

Elastic Load Balancer

Setting up an Application Load Balancer (ALB) for your VPC

Creating an Application Load Balancer in AWS | Tutorial

Creation Date: December 3, 2023
Created By: Victoria Vargas

1. Log into console and search for "EC2".

Log into console and search for "EC2".

2. Once you are at the EC2 dashboard, scroll down till you find the Load Balancing section. Click on "Load Balancers".

Once you are at the EC2 dashboard, scroll down till you find the Load Balancing section.
Click on "Load Balancers".

3. Once inside the Load Balancers section, you will click on "Create load balancer".

Once inside the Load Balancers section, you will click on "Create load balancer".

4. In the next page it will ask you what type of load balancer you'd want to use. Make sure you click on "Create" underneath the Application Load Balancer.

In the next page it will ask you what type of load balancer you'd want to use. Make sure you click on "Create" underneath the Application Load Balancer

5. Here you make sure to type out the desired name for your ALB.

Here you make sure to type out the desired name for your ALB.

6. In the Scheme, make sure to leave it in the default "Internet-facing" option, which will allow the ALB route requests from the internet.

In the Scheme, make sure to leave it in the default "Internet-facing" option, which will allow the ALB route requests from the internet.

7. On IP address type, in this tutorial we will only be using IPv4 addresses, so we will keep it at the default IPv4 address option.

On IP address type, in this tutorial we will only be using IPv4 addresses, so we will keep it at the default IPv4 address option.

8. In the Network mapping section, you will see an option to "Select a VPC". Here you will choose your desired VPC to connect the ALB to.

In the Network mapping section, you will see an option to "Select a VPC"
Here you will choose your desired VPC to connect the ALB to.

9. After selecting your desired VPC, you will then be given the option the select what subnets you would want the ALB to route traffic to. In this example, we will be selecting both of our public subnets.

After selecting your desired VPC, you will then be given the option the select what subnets you would want the ALB to route traffic to. 
In this example, we will be selecting both of our public subnets.

10. Then you would scroll down to the Security Groups section. Here you'd like to make a security group for the ALB. Click on the blue "create a new security group", which will open a new tab for you to create one.

Then you would scroll down to the Security Groups section. Here you'd like to make a security group for the ALB.
Click on the blue "create a new security group", which will open a new tab for you to create one.

11. Here you will type out the desired name of your ALB security group.

Here you will type out the desired name of your ALB security group.

12. Then you will have to type a small description of what the ALB security group is for.

Then you will have to type a small description of what the ALB security group is for.

13. In the VPC dropbox, make sure to select the same VPC you will be using to make the ALB.

In the VPC dropbox, make sure to select the same VPC you will be using to make the ALB.

14. Scroll down and you will find the Inbound rules section. In this section we will add a rule where the security group can allow internet access from anywhere through the HTTP port to the ALB.

Scroll down and you will find the Inbound rules section. 
In this section we will add a rule where the security group can allow internet access from anywhere through the HTTP port to the ALB.

15. You would click on the Custom TCP, type "HTTP", and click on the HTTP option.

You would click on the Custom TCP, type "HTTP", and click on the HTTP option.

16. You will than go to the Source, where you will click on the 0.0.0.0/0 in the CIDR blocks dropbox.

You will than go to the Source, where you will click on the 0.0.0.0/0 in the CIDR blocks dropbox.

17. Leave the rest of the settings in their default options and scroll down to click on "Create security group" to finalize the creation of your ALB security group.

Leave the rest of the settings in their default options and scroll down to click on "Create security group" to finalize the creation of your ALB security group.

18. Here you will see a green pop-up box that will show that you have successfully created your ALB security group. It will showcase you the details of your security group. Now you can exit out of this tab and go back to the ALB creation tab.

Here you will see a green pop-up box that will show that you have successfully created your ALB security group. It will showcase you the details of your security group.
Now you can exit out of this tab and go back to the ALB creation tab.

19. Now, go back to the ALB creation tab and choose the ALB security group that you've created from the dropbox.

Now, go back to the ALB creation tab and choose the ALB security group that you've created from the dropbox.

20. In the Listeners and routing section, we will be leaving the protocol and port to its default. We will than need to create a target group. Click on the blue "Create target group". It will open a new tab where you will create the target group.

In the Listeners and routing section, we will be leaving the protocol and port to its default. We will than need to create a target group. 
Click on the blue "Create target group". It will open a new tab where you will create the target group.

21. In the target group creation tab, it will make you choose a target type. In this example, we will be sticking to the "Instances" option.

In the target group creation tab, it will make you choose a target type. 
In this example, we will be sticking to the "Instances" option.

22. Underneath your selected target type choice, you will be able to name your target group for the ALB.

Underneath your selected target type choice, you will be able to name your target group for the ALB.

23. In the Protocol : Port box, leave it as the default HTTP 80.

In the Protocol : Port box, leave it as the default HTTP 80.

24. Underneath, you are given the choice to pick between the type of IP address you want the target group to target. In this example, we will be using IPv4.

Underneath, you are given the choice to pick between the type of IP address you want the target group to target. 
In this example, we will be using IPv4.

25. In the VPC section, make sure to choose the VPC where you are also creating the ALB.

In the VPC section, make sure to choose the VPC where you are also creating the ALB.

26. In protocol version, you can pick the type of protocol version you want to send requests to. We will be sticking to the default HTTP1 version.

In protocol version, you can pick the type of protocol version you want to send requests to. We will be sticking to the default HTTP1 version.

27. The health check portion sends requests to your target to check their status to make sure everything is running smoothly and healthy. You can change the health check protocol and health check path to your desired path. In this example, we will leave it as default.

The health check portion sends requests to your target to check their status to make sure everything is running smoothly and healthy. You can change the health check protocol and health check path to your desired path. 
In this example, we will leave it as default.

28. Leave the rest of your settings as default and click on the "Next" button

Leave the rest of your settings as default and click on the "Next" button

29. In the register targets, click on all the instances you'd like to register as targets.

In the register targets, click on all the instances you'd like to register as targets.

30. Make sure that after you choose your instances that you want to register as targets, that you put the correct port you'd want to route traffic to. Than click on "Include as pending below".

Make sure that after you choose your instances that you want to register as targets, that you put the correct port you'd want to route traffic to. 
Than click on "Include as pending below".

31. The "Include as pending below" will send the instances you've registered as targets to go to the "Review target", where it will show as pending.

The "Include as pending below" will send the instances you've registered as targets to go to the "Review target", where it will show as pending.

32. Review that your registered targets are correct and click on "Create target group".

Review that your registered targets are correct and click on "Create target group".

33. You will be notified that you have successfully created your target group and will be sent to the details page of the target group.

You will be notified that you have successfully created your target group and will be sent to the details page of the target group.

34. Go back to the ALB creation tab in the Listeners and routing section and click on "Select a target group" dropbox. The target group that you just created should pop up. Select it.

Go back to the ALB creation tab in the Listeners and routing section and click on "Select a target group" dropbox.
The target group that you just created should pop up. Select it.

35. Leave the rest of the settings as their defaults and scroll down until you see the Summary. Make sure to check that everything is correct for the creation of your ALB.

Leave the rest of the settings as their defaults and scroll down until you see the Summary. Make sure to check that everything is correct for the creation of your ALB.

36. Once you are ready, click on "Create load balancer".

Once you are ready, click on "Create load balancer".

37. You should be notified that you've successfully created the load balancer.

You should be notified that you've successfully created the load balancer.

38. If you want to check how your load balancer is doing, you can click on "View load balancer".

If you want to check how your load balancer is doing, you can click on "View load balancer".

39. It will send you to the Load Balancers page, where you can select the ALB that you've just created.

It will send you to the Load Balancers page, where you can select the ALB that you've just created.

40. Once you select your ALB, you can see the details of it and make sure that te configurations are correct.

Once you select your ALB, you can see the details of it and make sure that te configurations are correct.



If you followed all of these steps, you have now successfully finished creating your Application Load Balancer!