> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/cloud-cost-management/3.0/troubleshooting-and-resources/autostopping-guides/autostopping-proxy-alb-usecase.md).

# Configure AutoStopping proxy as a downstream of ALB

This usecase provides the steps to configure an AutoStopping proxy as a downstream system of an ALB.

Learn how to configure an AutoStopping proxy as a downstream system of an Application Load Balancer in AWS, as illustrated by this network architecture diagram:

![](https://3362046280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLgkNK1xq1Uj6rzIm2kum%2Fuploads%2Fgit-blob-c87066afe93ca21bea76b41d6dc468a917f2758c%2Fautostopping-alb-workflow-diagram.png?alt=media)

### Create a target group for the proxy VM with a health check configuration <a href="#create-a-target-group-for-the-proxy-vm-with-a-health-check-configuration" id="create-a-target-group-for-the-proxy-vm-with-a-health-check-configuration"></a>

On the AWS console, you need to create a target group for the proxy VM with a health check configuration, and then edit ALB rules and add forwarding action to the proxy target group.

1. On the AWS console, navigate to **Target Groups** and [create a target group](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-target-group.html).
2. Choose the proxy VM and register it as a target.
3. Make sure the port matches the port details that the application is using.
4. Configure the [health check settings](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/target-group-health-checks.html) as per the port information.

   ![](https://3362046280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLgkNK1xq1Uj6rzIm2kum%2Fuploads%2Fgit-blob-5c295e07e9b74a8cea1c0e04d99d058f7836e05d%2Fconfigure-health-check-settings.png?alt=media)
5. If the proxy needs to handle multiple ports (80, 443), create one target group for each of the ports.

   ![](https://3362046280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLgkNK1xq1Uj6rzIm2kum%2Fuploads%2Fgit-blob-96328820f9b8501b3a59da8dd9f98f3b7b30a8d8%2Fcreate-target-group.png?alt=media)
6. Edit ALB rules and add forwarding action to the proxy target group.

   All the URLs configured in the AutoStopping rules should point to the AutoStopping proxy target group.

   ![](https://3362046280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLgkNK1xq1Uj6rzIm2kum%2Fuploads%2Fgit-blob-18d8c9c603dc521044c25b9bbf9a0be6f1e3d4b2%2Fedit-alb-rules.png?alt=media)

### Create an AutoStopping rule with custom domains <a href="#create-an-autostopping-rule-with-custom-domains" id="create-an-autostopping-rule-with-custom-domains"></a>

In Harness, create AutoStopping rule for AWS with HTTP/HTTPS workload and configure custom domains in the AutoStopping rule.

![](https://3362046280-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLgkNK1xq1Uj6rzIm2kum%2Fuploads%2Fgit-blob-6e54f651649e503122707f57b2886f7b8a8da84d%2Fcreate-autostopping-rule-with-custom-domain.png?alt=media)

{% @harness-feedback/feedback %}
