Consolidating the platform onto AWS, with a budget that acts
HouseNow and CarNow ran on Vercel, Google Cloud, a Docker Swarm cluster and hand-made console settings. Over a year I moved the shared estate into Terraform, put the HouseNow web apps and shared services on AWS, retired most of the Google Cloud machines one at a time, and put a budget with an automatic action in front of the costliest batch workload.
- Period
- Oct 2025 – Oct 2026
- Duration
- 12 months
- Role
- Engineering Manager – Backend Lead
- Organisation
- HouseNow and CarNow, Housenow JSC
- Team
- About nine engineers committed to the infrastructure repository; I wrote the largest share
Results
| Figure | Measure |
|---|---|
| 9 | services on ECS Fargate, with a preview environment per pull requestStack and pipeline built in three days, 12–14 Oct 2026 (33 commits). |
| $500 | monthly budget on the costliest batch workload, with automatic suspensionEmail at 80%; at 90% of actual or 100% of forecast spend the pool scales to zero. |
| −66% | CI runner cost after moving self-hosted runners to a working-hours scheduleTeam estimate, Oct 2026: about $258 against $761 a month. |
| $25,000 | in AWS Activate credits, secured with an AWS partner and the engineering teamApproved and received in September 2026 for the move off Google Cloud; valid for two years. |
Context and constraints
By 2025 the products ran on Vercel (every web app and its scheduled jobs), Google Cloud (a Docker Swarm cluster run with Dokploy, Cloud Run services, and virtual machines for batch jobs and an SMS egress proxy), PlanetScale, Cloudflare and Bunny. Most of it had been configured by hand.
An incident involving a client showed the outage and compliance risk of infrastructure nobody could review or rebuild. Vercel's data-transfer charges grew with traffic, and we applied, through an AWS partner, for AWS Activate credits to fund the move off Google Cloud. In 2025 caching, cheaper vendors, query tuning and cloud credits had already saved $50K+; consolidation was the next step.
- No platform team: the same engineers kept shipping product work.
- Production traffic in the millions of API calls a day.
- Every production host had to move, and be able to move back, on its own.
- Cost had to fall, not just move to a new bill.
My role and decision rights
I set the conventions (a Terraform monorepo, a Bun operations CLI, shared remote state, secrets synced from a secrets manager) and taught them in an internal Terraform deep-dive in October 2025, a week before the repository started.
I wrote 115 of the repository's 333 commits, more than anyone else, including the ECS stack for the House web apps (19 of 22 commits), the batch-pool stack with its budget guard, and the fixed-IP egress for SMS. Teammates built the CI runner schedule, the analytics stack and the internal AI gateway on the same conventions.
Decision rights: I chose the target architecture and the order of the moves, and coordinated the AWS credit application with the partner and the engineers who would use the credits; vendor commitments were agreed with the company's leadership.
Architecture
Decisions
Containers on ECS Fargate for the web apps
Nine services were leaving Vercel: the public site and its back offices, an image service, the broker assistant and two background-job services. They needed long-running requests, image processing and the same build in every environment.
| Option | Assessment |
|---|---|
| Lambda behind API Gateway | Closest to Vercel's model, but cold starts and package limits for server-rendered apps. |
| Kubernetes on EKS | Most control, and a cluster to operate without a platform team. |
| ECS Fargate behind one load balancer (chosen) | Containers without servers to patch. |
We will run each web app as an ECS Fargate service behind one load balancer that accepts traffic only from Cloudflare's address ranges, deploy through GitHub OIDC with immutable, scanned images, run staging on Fargate Spot, and give every pull request a preview on the staging load balancer.
Gained
- The same image runs in preview, staging and production.
- No long-lived cloud keys in CI.
- Staging runs on spare-capacity pricing.
Paid
- We now own the load balancer, scaling rules and image pipeline that Vercel used to hide.
- Cloudflare's 100-second proxy timeout limits how long a scheduled request may run.
A budget that acts instead of one that only emails
The costliest workload is a pool of batch workers whose spend follows the work queue, not traffic. A stuck job could spend a month's budget in days.
| Option | Assessment |
|---|---|
| Email alerts only | Someone has to read the email in time. |
| An account-wide deny policy on budget breach | Stops the runaway job and production with it. |
| A tagged budget with an automatic action on this workload (chosen) | Stops only what is overspending. |
We will tag the pool, budget it at $500 a month, email at 80%, and at 90% of actual or 100% of forecast spend let a Lambda set a durable flag in SSM and scale the pool to zero. The deploy script honours the flag, so a routine redeploy cannot undo the suspension.
Gained
- The pool is suspended automatically when a budget notification fires.
- The suspension survives redeploys.
Paid
- A guard, not a hard cap: billing and notifications lag, so spend can pass the threshold before the pool stops, and other resources keep billing.
- A legitimate spike pauses the work until someone lifts the flag.
Cut fixed costs where the risk is known and written down
Several costs ran all night for nobody: always-on CI runners, a NAT gateway per network, staging at full price.
| Option | Assessment |
|---|---|
| Leave capacity always on | Simple, and paid for 24 hours a day. |
| Move everything to hosted runners and managed defaults | Less to run, more per minute. |
| Schedule, share and discount, and record each risk (chosen) | Lower bill with named trade-offs. |
We will start the self-hosted runners at 07:00 and drain them at 18:00 on weekdays with hosted runners out of hours, run staging on Fargate Spot, and share one NAT gateway across private subnets.
Gained
- Runner cost down by about two thirds (team estimate).
- Staging and egress cost less every month.
Paid
- One NAT gateway is a single point of failure for outbound traffic in one zone; accepted for now and recorded.
- Builds outside working hours are slower.
Outcomes
- On Google Cloud, the Swarm manager, the cron and batch VMs, the SMS proxy and idle static IPs were retired step by step between August and October 2026.
- In October 2026 the HouseNow web apps were containerised and deployed to ECS Fargate, with per-PR previews, a rollback workflow and 20 EventBridge schedules replacing Vercel Cron; by 20 October their production traffic had fully cut over from Vercel to AWS.
- Analytics moved to RDS Multi-AZ with credentials rotated every seven days by Secrets Manager, and the newer stacks are reached through SSM only, with no public SSH.
- I coordinated with an AWS partner and the engineering team to secure $25,000 in AWS Activate credits, received in September 2026 and valid for two years.
What I would do differently
Take a whole-estate cost baseline before the first move. Each change was costed on its own, so savings are easier to defend line by line than as one before-and-after bill.
Run the deletion sweep first. Idle IPs and forgotten VMs were the cheapest wins, and they waited until late in the year.
Stack
- Terraform
- AWS ECS Fargate, ALB, ECR
- EventBridge Scheduler, Lambda
- AWS Budgets, SSM, Secrets Manager
- IAM Identity Center
- RDS, EFS, S3, EC2
- Cloudflare
- Google Cloud
- GitHub Actions with OIDC
- Trivy
- Bun