# Set Up a Load Balancer for Traffic Routing

{% hint style="info" %}
Related video: [Reblaze from AWS Marketplace: Routing Traffic ](https://www.youtube.com/watch?v=ZcManqA_m44\&list=PL6cxA-Fe3c445X7NyjZSK3Rk8fE9RLKpo\&index=3)
{% endhint %}

### ​Configure a Load Balancer

1. Go to the AWS Management console at <https://console.aws.amazon.com/>.
2. In AWS Services, go to EC2 > Load Balancers and click **Create Load Balancer.**

![](https://1443104804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYa27AYz47cZTEzJZB1vy%2Fuploads%2FPZFmkepH7io9JVJMiPhU%2Fimage.png?alt=media\&token=48b24598-b7b0-48b8-b44f-82fd36e3d596)

3\. Click **Create** for Application Load Balancer.

![](https://1443104804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYa27AYz47cZTEzJZB1vy%2Fuploads%2FPSrYbYACczjAXEIRmL54%2Fimage.png?alt=media\&token=83954f00-4e5a-433a-82cb-7e6060cc3ce3)

4\. Set the Load Balancer parameters:

![](https://1443104804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYa27AYz47cZTEzJZB1vy%2Fuploads%2FAy1cJmQbfA33DqlVx1Tx%2Fimage.png?alt=media\&token=d99b5228-95b1-4e5e-8b46-d0865793a4be)

&#x20;     1\. Enter a name for the Load Balancer.

&#x20;     2\. Under Load Balancer Protocol, select HTTP and HTTPS. &#x20;

&#x20;     3\. Under Availability Zones, select at least 2 zones.           &#x20;

&#x20;     These should be the same zones as you selected when specifying CloudFormation parameters      in Specify Stack Details.

5\. Click **Next: Configure Security Settings**.

### Configure Security Settings

On the HTTPS listener, attach the correct certificate and select the Security policy.

![](https://1443104804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYa27AYz47cZTEzJZB1vy%2Fuploads%2FPH2AY2F0qvy7sRjQxDzU%2Fimage.png?alt=media\&token=a885c694-9d41-41fe-915d-83fb51518107)

1. Select a certificate name.
2. Select a security policy.
3. Click **Next: Configure Security Groups.**

### Configure Security Groups

Allow access to the Load Balancer. Typically you will add a new security group for this, or you can select an existing one.

![](https://1443104804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYa27AYz47cZTEzJZB1vy%2Fuploads%2F93dviuShabPfX4qAWpI0%2Fimage.png?alt=media\&token=5c74199f-5ca4-457d-a355-3ba6794a0954)

1. Select **Create a new security group**.
2. Enter a name for the security group.
3. For TYPE, click and select HTTP for the first row and HTTPS for the second row.
4. Click **Next: Configure Routing.**

### Configure Routing and Create the Load Balancer

![](https://1443104804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYa27AYz47cZTEzJZB1vy%2Fuploads%2FRAAxnE5aeNAkyNwkOvO5%2Fimage.png?alt=media\&token=2058ccf9-7a56-4d43-be40-0ab96e23438c)

1. For Target Group, select **Existing target group**.
2. For Target type, select Reblaze-80. This is already available from the Marketplace deployment.
3. Click **Next: Register Targets**.
4. Click **Next: Review**.
5. Click **Create**.
6. Once the load balancer is created, click **Close**.

### Update Listeners

The Load Balancer has been created and will appear on the Load Balancer page. Since you created an HTTPS listener earlier, the target group will require an update.

![](https://1443104804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYa27AYz47cZTEzJZB1vy%2Fuploads%2FKKbiRjjTqMQ7C8whkG0B%2Fimage.png?alt=media\&token=777c7dbf-c9af-41ca-ae2a-7c5319525c16)

1. Select the Listeners tab for the load balancer.
2. You can see that both Listeners are being forwarded to Reblaze-80.\
   Click **View/edit rules** for HTTPS 443.\
   The Rules page for HTTPS:443 appears.
3. Click the edit icon (the pencil icon) on the Rules toolbar to edit the rules, then click the edit icon for HTTP:443.\
   The Edit Rule box appears.
4. Click the edit icon under THEN.
5. For Target group, select Reblaze-443.
6. Click **Update** on the Rules toolbar.\
   A message that "Default rule was successfully updated" appears.
7. Click the back arrow on the Rules toolbar to return to the Load Balancer page.
8. To confirm that the load balancer is configured correctly:
   1. Select the Description tab for the load balancer.
   2. Highlight the DNS name and click the copy icon next to it.
   3. Paste the DNS into a browser window.\
      The browser should return a "403 Forbidden" page from "rhino-core-shield".

Now, return to [AWS](https://waap.docs.link11.com/v2.18/marketplace-onboarding/aws) for the final steps needed to get Reblaze running on your website.
