Setting Up AWS Application Load Balancer (ALB)
Overview
An AWS Application Load Balancer (ALB) serves as the entry point for HTTP/HTTPS traffic to your AutoStopping-managed resources. It intelligently routes requests and works with AutoStopping to start and stop resources based on traffic patterns.
How AWS Load Balancer Works with AutoStopping
A Harness load balancer in AWS consists of two primary components:
- Application Load Balancer (ALB): Routes HTTP/HTTPS traffic based on application-level information
- Lambda Function: Manages resource warm-up and displays progress pages during startup
Key Benefits
- Centralized Traffic Management: Direct traffic to multiple AutoStopped resources
- Reuse Across Rules: One load balancer can serve multiple AutoStopping rules
- Path-Based Routing: Route different paths to different resource groups
- Seamless User Experience: Users access resources through familiar URLs
DNS Configuration
Each load balancer requires a domain name (e.g., *.autostopping.example.com
) that points to the load balancer. This is typically configured as:
*.autostopping.example.com → Load balancer DNS address
Setup Process
Prerequisites
- An active AWS account with appropriate permissions
- A domain name you can configure (either in Route 53 or another DNS provider)
- AWS Connector configured in Harness
Creating a Load Balancer from the AutoStopping Homepage

-
In the AutoStopping overview page, click Load Balancers in the top right
-
Enter a name and select AWS in Cloud Provider
-
Choose a cloud connector or create a new one.
-
Enter Load Balancer Configuration.
- Choose access type as Internal or External
- Select the AWS region for deployment
- Choose an SSL certificate
- Select the VPC for deployment
- Choose appropriate security groups
-
Click Save Load Balancer
Your load balancer is now ready to use with AutoStopping rules.
If using Route 53, Harness automatically creates the necessary DNS record:
A record: *.autostopping.yourdomain.com → [ALB DNS address]
If using another DNS provider, you'll need to manually create a CNAME record:
- Go to your DNS provider's management console
- Create a wildcard CNAME record:
*.autostopping.yourcompany.com → [ALB DNS address]
- For detailed instructions, see AWS DNS CNAME documentation
Updating the Lambda Function
The AWS Load Balancer uses a Lambda function to manage traffic and handle resource warm-up. You may need to update this function to the latest version.
Step 1: Locate the Lambda Function
- Go to the AWS Console and navigate to the EC2 service
- Select Load Balancers and find your AutoStopping ALB
- Go to the Listeners tab
- Find the default rule and note the target group
- The target group contains the Lambda function that needs updating
Step 2: Update the Function Code
The current version is aws-proxymanager-0.1.3.zip
-
In AWS Console, navigate to Lambda → Functions and find your function
-
Select the Code tab
-
Click Upload from → .zip file
-
Select the downloaded zip file and click Save