Case study · Cloud backend

HomeProSG — AWS CDK Backend & Infrastructure

Implemented · sandbox deploy documented

The app's backend outgrew its managed platform: at about 84 operations, deployments hit a hard cloud limit. I rebuilt it as a dedicated AWS CDK GraphQL backend that reuses the same user accounts and database, so nothing had to be migrated, then added CRM, job and scheduling workflows and proved them against sandbox data.

Before · managed platform≈505

resources in one generated stack at 84 operations, past CloudFormation's 500-resource limit.

After · dedicated CDK app
AppSync GraphQL APIAPI foundation
Cognito user poolexisting pool, imported
DynamoDB single tableexisting table, imported
18 domain nested stacks
  • identity
  • provider catalog
  • warranty
  • job
  • booking
  • billing
  • preferences
  • notification
  • directory
  • reputation
  • invitation
  • admin
  • lead
  • messaging
  • feedback
  • follow-up
  • customer
  • scheduling

Built from reusable constructs: Lambda resolvers (Node.js) and JavaScript resolvers.

Verified Architecture Diagram Stacks, services and the 505-resource, 84-operation limit are from the CDK app and its README.

Overview

The managed platform places every function-backed resolver in one generated stack at roughly six resources per operation; at 84 operations that reached about 505 resources, past CloudFormation's 500-resource limit, with no supported way to split it.

I chose a dedicated CDK app that imports the existing Cognito pool and single-table DynamoDB and partitions resolvers across 18 domain nested stacks, built from reusable Lambda and JavaScript-resolver constructs. Operation families moved one per commit while the client switched planes through a reversible runtime config.

On the new backend I built a provider CRM with exact matching and explicit ambiguity errors, atomic lead-to-job conversion in a single transaction, a nine-operation appointment lifecycle with conditional-write slot locks, and shared-network lead routing, all behind shared authorisation that derives identity on the server.

A live end-to-end harness mints real claim-bearing tokens and caught three defects unit tests missed. A fail-closed deploy wrapper now prevents placeholder-configuration deploys.

Visual evidence

Before · managed platform≈505

resources in one generated stack at 84 operations, past CloudFormation's 500-resource limit.

After · dedicated CDK app
AppSync GraphQL APIAPI foundation
Cognito user poolexisting pool, imported
DynamoDB single tableexisting table, imported
18 domain nested stacks
  • identity
  • provider catalog
  • warranty
  • job
  • booking
  • billing
  • preferences
  • notification
  • directory
  • reputation
  • invitation
  • admin
  • lead
  • messaging
  • feedback
  • follow-up
  • customer
  • scheduling

Built from reusable constructs: Lambda resolvers (Node.js) and JavaScript resolvers.

Verified Architecture Diagram Stacks, services and the 505-resource, 84-operation limit are from the CDK app and its README.