# Day 36: Load Balancing EC2 Instances with Application Load Balancer

Welcome to Day 36. Today, we will learn how to create a load-balanced EC2 instance with an application load balancer. In this lab, you need to set up an EC2 instance named **devops-ec2** and install and configure Nginx on this EC2 instance. After that, you need to create a target group named devops-tg and an application load balancer named **devops-alb**.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767353246605/d82925e5-13ce-459f-a38f-05b687b8b662.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767353283788/13b85c13-5132-4be1-99b1-f6bccf6002e5.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767353343513/afa1bf91-ccba-43a1-8469-fff1edef8667.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767353419180/99f5b6a6-6497-44b8-b54d-4af820a70d0a.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767353461690/e56634e9-0979-4ac9-b193-d9c03e8af09c.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767353529325/d3ae0e3f-2830-4f82-9d31-c2d69fdd891f.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767353599138/6d9c0c03-421d-43ef-9741-bc77db929b42.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767353622536/08b2f2c7-96fd-4062-9562-55617b1dd9b2.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767353645142/4f0587b7-be72-417c-a073-9698d68b67a5.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767353861774/39657d68-e201-48a3-ab74-6dfa7955710e.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767353812573/b63cf9b3-d010-4888-834b-ead430bf1582.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767353878309/58ed7fdc-7961-48e9-958d-2d4d20da4484.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767353943401/0e563368-9c7e-4c28-9bc4-79e204e555fa.png align="center")

```bash
sudo apt install nginx -y

sudo systemctl start nginx

sudo systemctl enable --now nginx

sudo systemctl status nginx
```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767353705415/a58e0f2b-39fe-43f9-ac49-95fa10956ae1.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767353732978/2ddc5fda-2dff-432e-b004-f8aff1518cb3.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767353758904/ce3b84a4-7bac-45f7-ab41-372733dd4273.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767353774620/b4e246ec-4323-4666-8242-1540265f398d.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767354011296/c810c9b5-aefd-40e4-b378-df9f33e4115c.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767354024780/1d26db37-18a8-4e1f-8077-233cfa8059cc.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767354043053/c099df76-facc-41da-b798-6ee1dc9f83dc.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767354071221/9489186a-479a-4dcd-8de2-aad738c5e903.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767354088290/7d6e20f1-349f-4769-b0f5-75a101bf1dc0.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767354118211/4a48bc7b-3733-4ccb-899d-6e1e115ac8dd.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767354139696/3e07fc4d-e12d-4ed2-b763-cecc4fa8cca5.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767354202893/703fa242-b8cc-4f06-8575-207b8ce284f9.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767354267292/3368c29a-76c2-408a-b2cf-dc5b639e98ed.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767354282342/87a087ff-71ae-4f70-bc17-cef3c3fb0285.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767354513148/912fb23e-d2c9-4878-9d55-fef2b3411f53.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767354522310/5f1715b4-26db-41b1-a14f-de431b9b41bd.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767354553638/2efdab16-bfdc-4611-a308-05b013ac206d.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767354567402/c1eb082e-1fe9-426e-a5ba-98f9cdb9ba4c.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767354599741/83bfbb89-cd15-4af8-9f93-e9bd1d2764a6.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1767354628898/6dd216f3-6568-40d8-81a3-0c50190c7a9d.png align="center")

Congratulations you did it. It looks good. This lab was successfully completed without any errors. See you in day 37. If you have any issues please let me know I will be happy to assist you. Stay tuned and learn together. If you find my article useful, please kindly like and share it.
