Skip to Results
Case Study · Cloud FinOps

Cloud Cost Optimization Platform

Unified visibility across AWS, GCP, and Azure with statistical forecasting and automated optimization recommendations — built in Go on AWS

Client: 200-person B2B SaaS company · $2.3M annual cloud spend · Multi-cloud (AWS, GCP, Azure) · Built in Go on AWS

Representative work by our principal engineers, completed before CoreBackend LLC was formed

12 Weeks
Concept to Production
Full platform delivery
$160K/Year
Savings Identified
Found by the platform in its first 30 days
285 ms
API Latency (P95)
Measured · 43% under the 500 ms target
99.95%
Uptime
Measured · first 6 months in production

At a glance

  • Client: 200-person B2B SaaS company · $2.3M annual cloud spend across 127 accounts on AWS, GCP, and Azure · identity withheld under NDA.
  • Problem: No unified view of spend; finance spent 15+ hours a week reconciling CSV exports from three billing consoles, reports were 48 hours old, and an idle environment burned $24,600 before anyone noticed.
  • What we built: A multi-tenant FinOps platform in Go on AWS — per-provider collectors, ingestion-time normalization, materialized dashboard views, forecasting, anomaly detection, and budget alerts — for $239/month in run cost.
  • Headline numbers: $160K/year of savings identified in the first 30 days (identified, not yet realised) · API P95 latency 43% under the 500 ms target (measured) · 99.95% uptime over six months (measured) · manual reconciliation hours 15 → 0.
  • Timeline & team: 12 weeks from concept to production · architect-led delivery by CoreBackend's senior engineering team.
  • Status: In production, operated by the client's platform team.

The Challenge

A fast-growing 200-person B2B SaaS company was managing $2.3M in annual cloud spend across AWS, GCP, and Azure — but had zero unified visibility. Finance manually exported CSV files from three billing consoles, spending 15+ hours per week reconciling different currencies, service names, and region codes — and two days at every month-end producing the consolidated report. By the time they produced reports, the data was 48 hours old and budget overruns had already happened.

The real cost wasn't wasted time — it was missed opportunities. A development environment had been running unnoticed for three months — $24,600 — and was only found when the platform's first collection run flagged it. Reserved instance coverage sat at 12% because nobody could track utilization across providers. EC2 instances ran at 8% CPU. Storage volumes sat unattached. Cost anomalies went undetected for weeks.

When their CFO demanded better — current visibility by customer, feature, and team, with alerts before budget overruns — they evaluated enterprise FinOps platforms. One enterprise FinOps suite quoted ~$50K/year. Another needed a six-month rollout. Neither fit a 127-account environment that needed answers in weeks, at a price that made sense against $2.3M of spend.

They needed production-grade multi-cloud visibility without enterprise pricing or timeline.

The Solution

We built a cloud-native, multi-tenant cost optimization platform that unifies AWS, GCP, and Azure into one view. Near-real-time collection every 15 minutes, ingestion-time normalization, statistical forecasting, automated anomaly detection, and actionable savings recommendations — all running at $239/month in infrastructure run cost (excluding the one-time build).

The architecture follows three guiding principles: separate what changes from what doesn't (provider-specific logic isolated behind clean interfaces), optimize for the common path (pre-aggregated views for fast dashboards, async pipelines for slow provider APIs), and treat cost as a first-class constraint (every service choice evaluated against a $300/month infrastructure budget). The result delivers the capabilities of an enterprise FinOps suite at a fraction of its run cost.

System Context

System Context

One collector per provider pulls cost and resource data from AWS, GCP, and Azure every 15 minutes. Data flows through normalization, analysis, and forecasting engines to power unified dashboards, budget alerts, and savings recommendations — the $160K/yr figure in the diagram is savings identified by the platform, not realised to date.

Built on Amazon Web Services

ECS Fargate

Serverless containers + Spot

Aurora Serverless v2

Auto-scaling PostgreSQL

SQS

Reliable async processing

EventBridge

Scheduled triggers

API Gateway

REST API + rate limiting

Cognito

JWT authentication

CloudWatch

Metrics & alerting

X-Ray

Distributed tracing

Secrets Manager

Credential security

Multi-Cloud Integration
AWS: aws-sdk-go-v2
GCP: cloud.google.com/go
Azure: azure-sdk-for-go

Container Architecture

Architecture Overview

Multi-AZ VPC with ECS Fargate for compute (2-4 API tasks, 2-20 Spot worker tasks at 70% savings), Aurora Serverless v2 for data (scales 0.5-4 ACU automatically), and SQS for reliable async processing. API services respond in <300 ms P95 while workers collect and analyze cloud data every 15 minutes.

This architecture powers six core capabilities that work together to give finance and engineering teams complete control over their multi-cloud spend.

Multi-Cloud Normalization

Unified USD, service taxonomy, region standardization

Statistical Forecasting

30/60/90-day predictions with confidence intervals

Anomaly Detection

Z-score, threshold breach, week-over-week comparison

Budget Tracking

Alerts at 50%, 80%, 100% thresholds on every refresh

Automated Recommendations

Unused resources, rightsizing, storage optimization

Audit Trail

SOC 2-ready compliance logging

What Makes This Approach Distinctive
Enterprise results, startup run cost $239/month run cost vs. a ~$50K/year enterprise quote — 94% lower, excluding the one-time build
Production-grade from day one Multi-AZ, 5-layer credential security, full observability — not a prototype
Built as a reusable platform Multi-tenant by design: the client's business units are the first tenants, and adding one is configuration, not redesign
Operable by the existing team Run by the client's platform team — no dedicated FinOps engineer required

No more CSV exports. No more billing console hopping. No more budget surprises.

How It Works

The platform handles two fundamentally different workloads: interactive dashboard queries that must respond in under 500 ms, and background data collection from cloud provider APIs that can take up to 30 seconds per request. Rather than forcing both through the same path, we designed separate, optimized pipelines — a fast synchronous path for user-facing requests and an async queue-driven pipeline for data ingestion — connected through a shared data layer with pre-computed views.

The three diagrams below trace a request through each path and show how our multi-cloud abstraction layer normalizes data from providers with fundamentally different APIs, rate limits, and data models.

Dashboard Performance

Request Flow

Request path: CloudFront (CDN + DDoS protection) → API Gateway (JWT validation + rate limiting) → VPC Link → API Service (tenant context + RBAC) → Aurora (materialized views). Total well inside the 500 ms P95 target, with 43% headroom.

Key Design Decision

Why pre-aggregated materialized views?

Dashboard queries aggregate millions of cost records across 13 months. Raw queries take 2-3 seconds — violating our <500 ms P95 target. By refreshing materialized views every 15 minutes after data collection, we serve complex aggregations in under 100 ms. The tradeoff — 15-minute data freshness — is invisible for cost data that's already 12-24 hours delayed from cloud providers.

While dashboards serve pre-computed data in milliseconds, the real complexity lives in how that data gets collected, normalized, and analyzed behind the scenes. The collection pipeline runs every 15 minutes, processing data from 127 cloud accounts across three providers without ever blocking a user request.

Data Collection Pipeline

Collection Flow

EventBridge (15-min trigger) → SQS (queued jobs) → Fargate Spot Workers (70% savings) → Secrets Manager (5-layer credential security) → Provider APIs (rate-limited: AWS 5/sec, GCP 1/sec, Azure 0.1/sec) → Normalization (USD, 6 service categories, 6 region zones) → Aurora + S3 archives → Analytics workers (budgets, anomalies, recommendations).

Key Design Decision

Why async collection with SQS?

Cloud billing APIs are slow (2-30 seconds), rate-limited (AWS 5/sec, GCP 1/sec, Azure 0.1/sec — a 50× difference), and occasionally unreliable. By decoupling collection from user-facing APIs through SQS, dashboards respond in <300 ms regardless of external API performance. If AWS Cost Explorer times out, the SQS visibility timeout expires and another worker retries automatically; a job that fails three times lands in the dead-letter queue, so no collection job is dropped.

The hardest engineering problem wasn't building the pipeline — it was making three fundamentally different cloud APIs look identical to the rest of the system. AWS, GCP, and Azure use different authentication models, return data in different formats, and enforce rate limits that vary by 50×. The abstraction layer below is what makes "multi-cloud" a reality rather than a marketing claim.

Multi-Cloud Abstraction Layer

Adapter Pattern

CloudCollector interface defines the contract: CollectCosts(), CollectResources(), ValidateCredentials(), Provider(). Three adapters implement provider-specific authentication (AWS IAM roles, GCP service accounts, Azure service principals), rate limits, and circuit breakers. Normalization layer converts 120+ services to 6 categories, 50+ regions to 6 zones, all currencies to USD.

Key Design Decision

Why the adapter pattern?

AWS, GCP, and Azure have fundamentally different authentication methods, rate limits (50× difference), and data models. The adapter pattern isolates complexity: each adapter handles its own rate limiting, retry logic, and authentication quirks while exposing a clean interface. Adding Oracle Cloud or Alibaba later means implementing one new adapter — zero changes to existing code.

Key Design Decision

Why normalize at ingestion time?

Query-time normalization adds 200-500 ms latency per request. Ingestion-time normalization runs once per data point and stores both original and normalized values. Dashboard queries hit pre-normalized data and return in <100 ms. Storage overhead is only 20% — storage is cheap; user time is not.

Built for Production

Building a working prototype is straightforward. Building a system that handles sensitive financial data across 127 cloud accounts — where a security breach exposes cost structures, a data loss corrupts compliance records, or a silent failure means missed budget alerts — requires a fundamentally different engineering approach.

We designed three production layers from day one, not as afterthoughts bolted onto a prototype: a data architecture with strict tenant isolation and encryption at every boundary, resilience patterns that gracefully handle the inevitable failures of external cloud APIs, and a high-availability infrastructure with full observability so the client's existing platform team can operate it confidently without a dedicated FinOps engineer.

Data Architecture & Security

Security Architecture

Aurora Serverless v2 with monthly-partitioned tables (13 months hot, then S3 Parquet → Glacier for 7-year compliance). Materialized views refresh every 15 minutes for <100 ms queries. Three-layer tenant isolation: API Gateway JWT → Application middleware → Repository WHERE tenant_id=$1. Five-layer credential defense: namespace isolation → ownership validation → IAM restriction → KMS encryption → CloudTrail audit.

Key Design Decision

Why Aurora Serverless v2?

TimescaleDB requires always-on EC2 ($150+/month) plus operational overhead — overkill for 1M records/month. DynamoDB struggles with complex aggregations our dashboards require. Aurora Serverless v2 gives us PostgreSQL's query flexibility with serverless economics: scales from 0.5 ACU when idle to 4 ACU during spikes. At current load the database runs at ~$73/month total (compute, storage, I/O).

Key Design Decision

Why application-level tenant isolation?

Database-per-tenant at 100 tenants = 100 Aurora clusters × ~$73/month = ~$7,300/month. Application-level filtering keeps it at one ~$73/month cluster — 99% lower. We enforce isolation by construction: repository methods require tenant context, every query carries WHERE tenant_id = $1, and 100+ automated tests verify no cross-tenant leakage. PostgreSQL Row-Level Security is planned as a second, defense-in-depth layer.

Security protects data at rest. Resilience protects the system in motion — when cloud provider APIs throttle requests, return errors, or go down entirely. The platform interacts with external APIs thousands of times per day, and each call is an opportunity for failure. The patterns below ensure that no single provider outage, API timeout, or rate limit breach can compromise data integrity or degrade the user experience.

Resilience Patterns

Failure Handling

Three-phase protection. Entry: Rate limiting (per provider + per tenant), idempotency keys. Processing: Per-provider circuit breakers (CLOSED → OPEN after 5 failures → HALF_OPEN after 30s), async SQS handoff. Completion: Exponential backoff (1s → 2s → 4s, max 30s, ±20% jitter), Dead Letter Queue after 3 attempts.

Key Design Decision

Why per-provider circuit breakers?

If Azure's API is degraded, a global circuit breaker would halt AWS and GCP collection. Per-provider isolation prevents cascade: Azure goes down → Azure circuit opens → AWS and GCP continue normally. Each provider has independent health.

Resilience patterns handle individual failures. The infrastructure layer ensures the entire platform stays available — even when an AWS Availability Zone goes down — and gives the operations team clear visibility into system health without requiring 24/7 manual monitoring.

High Availability & Observability

Infrastructure

Multi-AZ deployment: Aurora writer (AZ-A) + reader (AZ-B) with <60s auto-failover. ECS tasks distributed across both AZs. VPC endpoints eliminate NAT transfer costs (Secrets Manager, SQS, S3, ECR, Logs). X-Ray tracing (5% sampling) + CloudWatch dashboards (latency, errors, queue depth). Alert route: CloudWatch alarm → SNS → PagerDuty (on-call) and Slack; a P1 page is acknowledged within 15 minutes.

Key Design Decision

Why ECS Fargate Spot for workers?

Lambda's 15-minute limit is fine for one API call (2–30 seconds) but not for a whole-account sweep, which walks hundreds of paginated, rate-limited calls and runs 20–40 minutes — and long-running Lambda time costs more than a container. EKS costs $73/month for the control plane alone (31% of the platform's actual $239/mo run cost). ECS Fargate provides serverless containers with unlimited runtime, and Fargate Spot saves 70% on compute. Workers are stateless — if AWS reclaims a Spot task, SQS redelivers the message automatically, so no job is lost under the stated failure model.

Production Features Delivered
Sub-500 ms P95 API latency target met with 43% headroom
15-minute data freshness across all providers
Multi-tenant isolation enforced in the application layer, verified by 100+ automated cross-tenant tests (Row-Level Security planned as a second layer)
5-layer credential security (SOC 2-ready controls)
No dropped collection jobs (SQS + DLQ + S3 archives)
Multi-AZ deployment with automatic failover

Results

After six months in production managing $2.3M in annual cloud spend across 127 accounts, the platform has delivered measurable impact across every dimension the client's CFO originally defined as success criteria. The numbers below are a production snapshot at month six: latency and uptime are measured; savings are labelled identified (found and quantified by the platform) rather than realised, and the reserved-instance and Savings Plan coverage gap flagged in the Challenge is the platform's next recommendation.

Cloud Cost Optimizer

Month-6 production snapshot

Production snapshot · month 6 · published Dec 2025
Annual Savings Identified First 30 days
$ 160,000
Manual Hours / Week -100%
15 0
Status Fully automated
Reporting refresh 15-min cadence
48h 15m
After provider data lands Provider lag 12–24 h
API Latency (P95) 43% better
285ms
Target <500 ms
Platform Uptime Exceeded
99.95%
Target 99.5%
$8,200/mo
Idle dev environment
$2,400/mo
Oversized EC2
$1,600/mo
Unattached EBS
$1,200/mo
Old snapshots
Before this, our finance team was spending two days every month just trying to figure out what we were actually paying across AWS, GCP, and Azure. Now it's all in one dashboard.
— CFO, 200-person B2B SaaS company · name withheld at client request

How We Delivered

Phase 1 · Weeks 1–4

Collectors and normalization

The CloudCollector interface, the three provider adapters with their rate limits and circuit breakers, and ingestion-time normalization into one currency, six service categories, and six region zones.

Phase 2 · Weeks 5–8

Analytics, forecasting, and alerts

Materialized dashboard views, 30/60/90-day forecasts, anomaly detection, budget thresholds, and the recommendation engine that surfaced the first $160K/year of savings.

Phase 3 · Weeks 9–12

Hardening and handoff

Multi-AZ deployment, five-layer credential security, tenant isolation tests, observability and alert routing, then knowledge transfer to the client's platform team.

What the client received. The platform's source and infrastructure-as-code, the CloudWatch dashboards and alert definitions, runbooks for the failure modes described above, the decision notes behind every "Key Design Decision" on this page, and a handoff to their own platform team — the system is theirs to run, extend, or replace.

Three cloud bills and no single answer to what you are paying for?

Every engagement starts with a free Architecture Review — a written report on your system: bottlenecks, risks, and a recommended plan. Yours either way.