projects / cloudrelay
05/saas product

CloudRelay - EC2 Cost Optimiser

MVP (Internal Testing)Q1 2026

AWS EC2 Cost Optimizer - idle instance detection, auto-shutdown, cost tracking. Save 20–30% on EC2 spending for always-on Windows servers.

role
Sole architect - backend, infra, frontend, native EXE client
period
Q1 2026
status
MVP (Internal Testing)
impact
20–30% EC2 cost savings vs running 24/7

The Problem

Small accounting firms often run their operations on Windows EC2 instances - using them as remote desktops for accounting software, document management, and client work. These firms have genuine reasons to keep their infrastructure in the cloud: geo/IP compliance requirements, data residency concerns, and the need for consistent remote access.

But there's a costly default behavior: the instances run 24/7.

An accountant logs in at 9am, works until 6pm, and logs out. The EC2 instance keeps running through the night, through the weekend, billing at full on-demand rates. For a firm paying per hour across multiple instances, this idle compute adds up fast - typically 60–70% of running hours are genuinely idle.


The Solution

CloudRelay is an AWS idle-detection and auto-shutdown system built specifically for Windows EC2 servers. It monitors instance activity, shuts down idle instances on a configurable timer, and gives users a frictionless way to restart - via a web dashboard or a custom-built native EXE client - and RDP straight in.

The result: 20–30% estimated reduction in EC2 costs compared to running 24/7, without changing how the firm's team works.


How It Works

Instance running
       ↓
Activity monitoring (configurable idle timer)
       ↓
No activity detected → Auto-shutdown via Lambda
       ↓
User needs access → Web dashboard or EXE client → One-click restart
       ↓
AWS EventBridge notifies CloudRelay of state change (near real-time)
       ↓
Instance running → User RDPs in directly

Key Features

Feature Detail
Idle Detection & Auto-Shutdown Monitors EC2 instance activity; shuts down on configurable idle timer via Lambda
Web Dashboard Browser-based interface for starting, stopping, and monitoring instances
Native EXE Client Custom-built Windows executable using AWS SDK for one-click instance restart and direct RDP launch
EventBridge Integration Near real-time instance state sync - no polling, no stale status
Configurable Timers Idle threshold and shutdown delay adjustable per instance or per firm
Geo/IP Compliance Supports firms with data residency or IP-based compliance requirements - instances stay in the right region, just not running when idle

Technical Architecture

Stack: Node.js · Express.js · Next.js · AWS EC2 · AWS Lambda · AWS EventBridge · AWS SDK · Windows RDP

Key Design Decisions

Lambda for Shutdown Execution
The auto-shutdown is executed by an AWS Lambda function triggered on the idle detection signal. Lambda is the right tool: event-driven, no server to manage, and natively authorized to call EC2 APIs via IAM. The shutdown happens in seconds with no running infrastructure required.

EventBridge for Real-Time State Sync (No Polling)
A naive implementation would poll the EC2 API every N seconds to check instance state - wasting API calls and introducing latency. CloudRelay instead registers an AWS EventBridge rule that fires on EC2 instance state changes (starting, running, stopping, stopped). State changes sync into CloudRelay in near real-time, keeping the dashboard accurate without any polling overhead.

Custom EXE Client for Non-Technical Users
Accounting firms aren't populated with developers. Asking a non-technical user to log into the AWS Console to start an instance is not acceptable UX. The custom Windows EXE - built with the AWS SDK - provides a one-click experience: click "Start," wait for the instance to reach Running state, click "Connect," and RDP opens automatically. No AWS Console interaction required.

IAM Least-Privilege
The EXE client and dashboard operate with scoped IAM credentials - permission to start/stop specific instance IDs, nothing more. Client credentials are isolated per firm.


Development Process

  1. Problem validation - Confirmed idle billing patterns with accounting firm usage data; quantified the savings opportunity at 20–30% of EC2 costs
  2. Core shutdown system - Built Lambda-based idle detection and auto-shutdown; integrated with EC2 instance monitoring
  3. EventBridge integration - Replaced polling with event-driven state sync for accurate, real-time instance status
  4. Web dashboard - Built Next.js dashboard for instance management, status monitoring, and configuration
  5. EXE client - Developed native Windows client with AWS SDK for non-technical user access - start instance and launch RDP in one click

Business Impact

For an accounting firm running two or three Windows EC2 instances that are idle 60–70% of the time, CloudRelay translates to:

  • 20–30% reduction in EC2 costs with no change in working patterns
  • No workflow disruption - the restart-and-RDP experience is fast and requires no AWS knowledge
  • Full compliance maintained - instances remain in the correct region; CloudRelay doesn't move or replicate data

Impact & Takeaway

CloudRelay solves a problem that's widespread but invisible: the steady bleed of idle EC2 costs at firms that don't have a dedicated DevOps engineer managing their cloud spend. The solution required understanding both the technical layer (Lambda, EventBridge, AWS SDK) and the user layer (a non-technical accountant who just wants to open their desktop).

The EXE client is the detail that makes this real-world deployable - without it, the system works but nobody uses it.

Idle EC2 billing is a silent tax on small firms. CloudRelay makes auto-shutdown invisible and restart effortless.


Tags: AWS cost optimization · EC2 cost reduction · cloud cost management · idle instance detection · infrastructure cost savings · AWS billing optimization · FinOps · Windows EC2