AWS
Prerequisite: Set Up Proxy and/or Load Balancer
AutoStopping is designed to integrate seamlessly with native load-balancing solutions like AWS ALB. However, for use cases that fall outside of these integrations such as SSH, RDP, or RDS connections, AutoStopping offers an advanced reverse proxy solution: AutoStopping Proxy.
AWS Load Balancer
A cloud-native service that distributes incoming HTTP/HTTPS traffic across multiple targets. It monitors web traffic patterns and automatically starts your resources when traffic arrives.
AutoStopping Proxy
This proxy VM sits in front of your virtual machines and intelligently starts or stops them based on incoming traffic. It supports both HTTP(S) and TCP connections. Built on the proven, open-source Envoy Proxy, the AutoStopping Proxy is capable of managing traffic for multiple AutoStopping-managed VMs from a single instance.
The table below shows the resources supported by AutoStopping and the appropriate traffic management you can use for each resource type.
Amazon EC2
✅
✅
Auto Scaling Groups
✅
✅
Amazon RDS Instances
✅
❌
Amazon ECS
❌
✅

In the AutoStopping Rules page, click Load Balancers in the top right. Please refer to official AWS documentation for details.
Enter a name and select AWS in Cloud Provider
Choose a cloud connector or create a new one.
Enter Load Balancer Configuration:
Access Type: Choose Internal (for private network access within your VPC) or External (for public internet access). Internal load balancers are ideal for backend services, while external load balancers are necessary for user-facing applications.
Region: Select the AWS region where your resources are located. This must match the region where your target EC2 instances or ECS services are running.
SSL Certificate: Choose an existing certificate from AWS Certificate Manager or create a new one for HTTPS connections. This is required for secure HTTPS traffic and helps establish trust with your users.
VPC: Select the Virtual Private Cloud where your target instances are running. The load balancer must be in the same VPC as the resources it will manage.
Security Groups: Choose security groups that allow appropriate traffic (HTTP/HTTPS) to your load balancer. These act as a virtual firewall controlling which traffic can reach your load balancer and subsequently your instances.
Click Save Load Balancer

In Harness, go to the Cloud Costs module. Click on AutoStopping Rules from left Navbar.
Click Load Balancers.
Click Create New Load Balancer. Click Create New AutoStopping Proxy.
Enter a name and select AWS in Cloud Provider.
Choose an existing connector or create a new one.
Enter AutoStopping Proxy Configuration.
Region: Select the AWS region where your target resources are hosted
API Key: Enter a Harness API key for authentication
Choose No Expiration when creating this key
See Create an API Key for more information
VPC: Select the Virtual Private Cloud where your resources are located
Security Groups: Select security groups to control traffic flow
Ensure all required ports and protocols are allowed
Subnet: Select the subnet for the proxy deployment
Machine type: Select an appropriate AWS instance type for the proxy
Choose based on your expected traffic volume and performance needs
Key Pair: Select an SSH key pair to connect to your proxy VM
TLS Certificate Configuration:
TLS Certificate Secret Version: Provide a PEM-encoded certificate stored in AWS Secrets Manager
Store your certificate in AWS Secrets Manager using the Other type of secret option
Recommended naming convention: use harness/ prefix in the secret name
TLS Private Key Secret Version: Provide the ARN of your private key secret
Format: 'arn:aws:secretsmanager:[Region]:[AccountId]㊙️SecretName-6RandomCharacters'
See AWS documentation on creating secrets
[OPTIONAL] Encrypted EBS Volume: Enable to encrypt the EBS volume
[OPTIONAL] Allocate Static IP: Enable to assign an elastic IP address
Makes the proxy publicly accessible
Remember to update your DNS records to point to this IP
Click Save AutoStopping Proxy.
Create AutoStopping Rule
In Harness, navigate to Cloud Costs > AutoStopping Rules and click New AutoStopping Rule.
Select Cloud Provider as AWS. Select an existing AWS connector or create a new one.
Step 1: Configuration

Enter a descriptive Name for your rule.
AutoStopping Type: Choose how you want your resources to be managed automatically. You can either choose Traffic-based with schedules optionally or Schedules only.
Traffic-based with schedules optionally: Resources automatically stop when idle and restart when traffic is detected. You can configure schedule overrides in advanced settings.
Schedules only: Resources automatically start and stop based on defined schedules. You can configure multiple schedules in advanced settings.
Set the Idle Time - the duration an instance should be inactive before stopping
From the Resources to be managed section, choose the resource type you want to manage:
Alerts and other Advanced Configuration (Optional):
Get instant notifications when resources managed by the rule experience problems starting up or shutting down properly.

AutoStopping Alerts: Configure notifications for critical events related to your AutoStopping rules. Click on +Add Alert to add an alert.
Rule create: Receive notifications when new AutoStopping rules are created in your environment. This helps track who is creating rules and when, providing better governance.
Rule update: Get alerts when existing rules are modified. This helps maintain awareness of configuration changes that might affect resource availability or cost savings.
Rule delete: Be notified when rules are removed. This ensures you're aware of any changes that might affect resource management or cost optimization strategies.
Rule warm up failures: Receive alerts when resources fail to start properly. This is critical for addressing availability issues quickly and preventing application downtime.
Rule cool down failures: Get notifications when resources fail to stop as expected. This helps identify potential issues that could prevent cost savings or indicate resource problems.
Notification Channels: Receive real-time notifications directly in Slack or e-mail. Configure specific channels for different types of alerts to streamline your team's response workflow.

Run Options:
Hide Progress Page: Toggle this to disable the display of a progress page during instance warm-up. This option is especially useful when the service is invoked by an automation system, as it prevents misinterpretation of the progress page as the intended response from a service that is onboarded to AutoStopping. By hiding the progress page, the first response of warming up a rule after a downtime will be delayed until the intended service is up and running.
Dry-Run: Toggle this button if you wish to evaluate the feature without terminating your cloud resources.
Set dependencies between two or more AutoStopping Rules when you want one Rule to make one or more Rules to be active based on the traffic that it receives. For example for an application server dependent on a database server, create two AutoStopping Rules managing both the servers. Add a dependency on the Rule managing the application server to be dependent on the Rule managing the database server. Link your rule to other AutoStopping rules if resources depend on each other.
Click Add Dependency and select a rule from the RULES drop-down list.
In DELAY IN SECS, enter the number of seconds the dependent rule should wait after warming up before warming up this rule.
Create fixed uptime or downtime schedules for the resources managed by this AutoStopping Rule. When a resource is configured to go up or down on a fixed schedule, it is unaffected by activity or idleness during that time period.
In certain scenarios, you would not want your resources to go down or up. For example, every Friday at 5 p.m. you want your ABC resource to go down. You can schedule downtime for your ABC resource. During this window, the resource is forced to go down regardless of the defined rule. You can choose to specify uptime for your resources in the same way.
Click Add Fixed Schedule.
Give the schedule a Name.
Select the Type of schedule (Uptime or Downtime).
Select the Time Zone.
Set the schedule period with Begins on and Ends on dates and times. You can also select the Never ends checkbox.
To set a recurring schedule, select the repeat frequency and the days of the week, and set the Start and End times. You can also select All Day.

Step 2: Setup Access
Set up access for TCP workload or SSH/RDP
Setting up access for TCP workload or SSH/RDP allows AutoStopping to detect activity and idleness, and ensure that the database is up and running only when you need it. Use the AutoStopping Proxy URL (IP/Hostname of the Proxy and a unique autogenerated port number) for this AutoStopping Rule when you connect to the RDS database using any database client. The Proxy URL is generated when you save the AutoStopping Rule. If you need to access the resources managed by this AutoStopping rule using TCP or SSH/RDP HTTPS URL, you need to perform the following steps:
Choose an AutoStopping Proxy load balancer from the Specify AutoStopping Proxy dropdown list to set up access.
Toggle SSH or RDP to specify the listening ports. The port number is autopopulated based on the security group.
Specify the source port numbers and the target TCP ports your application is listening to. If the source port is not specified, a random port will be generated at the backend. This auto-generated port will continue to be used as long as the target port remains unchanged or unless the user explicitly modifies the source port.
Click Next.
Set up access for HTTP/HTTPS workload
If you need to access the resources managed by this AutoStopping rule using an HTTP or HTTPS URL, you need to perform the following steps:
Choose an Application Load Balancer or an AutoStopping Proxy load balancer from the dropdown list to set up access.
Option A: HTTP/HTTPS Access (Load Balancer)
Option B: SSH/RDP Access (AutoStopping Proxy)
Since RDS has only AutoStopping Proxy supported, you can use this to manage your traffic. In Set up Access, select Proxy from the drop-down list or create a new one. Select Source Port and Target Port. Click Next.
Setting Up DNS Link
A DNS link allows you to access the resources managed by the AutoStopping rule using an HTTP or HTTPS URL. To create a DNS Link, follow these steps:
1. Select a Load Balancer
From the dropdown list, select the load balancer associated with your ECS service.
The rule requires this load balancer to detect traffic and manage instances appropriately.
2. Select the URL for Accessing Resources
Choose one of the following URL options:
Option A: Auto-generated URL
Select Use the auto-generated URL to access resources managed by this AutoStopping Rule.
Every AutoStopping rule will have an auto-generated URL that works as a subdomain to the domain specified for the load balancer.
Since the load balancer configures a wildcard domain (e.g.,
*.autostopping.yourcompany.com), this URL will automatically point to the correct load balancer.
Option B: Custom URL
Enter the custom URL currently used to access the instances (without prefixing the scheme).
For multiple URLs, enter comma-separated values.
Step 3: Review
In Review, verify all the configuration details and click Save Rule. To edit any of the configuration settings, click EDIT and modify the settings.
Your AutoStopping rule is listed under the AutoStopping Rules dashboard.
AWS AutoStopping Savings Computation
For AWS, the savings are determined by calculating the total cost based on amortized values after deducting total discounts.
Cost = Amortized Cost - Total Discounts
Savings numbers will become precise only after the savings numbers are finalized after the 15th of the next month (after the final settlement). Savings will be recomputed for the previous month on the 15th of the next month to ensure any updates to CUR/billing-export are considered in the final savings numbers for the month.
Last updated
Was this helpful?





