# 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://865091150-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0roddwHI2wUZTmqjZrkz%2Fuploads%2FSNUgEBh1ZbzuMvpNl4II%2Fimage.png?alt=media\&token=175acf2b-18c2-4854-bf57-9aed0e3c004e)

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

![](https://865091150-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0roddwHI2wUZTmqjZrkz%2Fuploads%2FnKNlAGCdM9fTsEcwfHZE%2Fimage.png?alt=media\&token=2d3a712c-da36-413b-824c-a97bbcf4954c)

4\. Set the Load Balancer parameters:

![](https://865091150-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0roddwHI2wUZTmqjZrkz%2Fuploads%2F1nhJNoLFy4bSdFA17qzB%2Fimage.png?alt=media\&token=49bfa646-cf8b-4146-bfee-d29b12c86369)

1. Enter a name for the Load Balancer.
2. Under Load Balancer Protocol, select HTTP and HTTPS.
3. Under Availability Zones, select at least 2 zones.\
   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.

1. Click **Next: Configure Security Settings**.

![](https://865091150-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0roddwHI2wUZTmqjZrkz%2Fuploads%2FnbAktV2LcBp2nqbAG86u%2Fimage.png?alt=media\&token=d16c20f7-9a35-4ec5-8dfb-451c0d309d2b)

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://865091150-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0roddwHI2wUZTmqjZrkz%2Fuploads%2FYcgWVYOaLMw59VFrCVEe%2Fimage.png?alt=media\&token=99a3efaf-62f9-4c70-98fa-8bdc900499a7)

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://865091150-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0roddwHI2wUZTmqjZrkz%2Fuploads%2FbRRVwIeXlZwjii5seDTP%2Fimage.png?alt=media\&token=02ea21e4-f047-4e8c-91a5-661dfa67b83c)

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://865091150-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0roddwHI2wUZTmqjZrkz%2Fuploads%2FmPWCYoWt1bes5m1UAreJ%2Fimage.png?alt=media\&token=353e6d4c-924c-408f-831c-579af5c14eba)

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.20.2/marketplace-onboarding/aws) for the final steps needed to get Reblaze running on your website.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://waap.docs.link11.com/v2.20.2/marketplace-onboarding/aws/set-up-a-load-balancer-for-traffic-routing.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
