DEV Community

Randika Madhushan Perera
Randika Madhushan Perera

Posted on

A Pet Re-homing platform that costs $29 a month to run

The Architecture of PawReHome - 24 lambdas, 68 routes, Aurora Serverless v2 with no connection pool anywhere and the single constraint that decided all of it.

Series: Building PawReHome Ep-01

PawReHome is a pet-rehoming platform: people post stray or surrendered animals, adopters apply, admins verify listings, rescue organizations manage their own rosters.

The interesting part is the constraint I built it under: it had to cost almost nothing while idle. No funding, no revenue, no guarantee anyone would use it.

That one requirement decided the database, the way lambda talks to it, the networking and the error handling. This post is the map. This links to are where the actual difficulty lives.

The Stack

Layer and Choice

  • Frontend - Next.js 14.2.35, App Router, Tailwind, 30+ pages
  • Hosting - AWS Amplify Hosting (CloudFront underneath)
  • API - API Gateway REST plus WebSocket API
  • Compute - 24 Lambda functions, 256 MB 29s timeout
  • Database - Aurora PostgreSQL Serverless v2 via RDS Data API
  • Auth - Cognito user pool, group based roles
  • Storage - S3 for listing images
  • Email - SES
  • IaC - AWS SAM/ CloudFormation

The Shape of it

PawReHome-Serverless - The shape of it

One Request, end to end

One Request end to end

What is costs

Line - Cost (2026 September)

Aurora Serverless v2 ACU-hours - $29.21
Aurora storage I/O - $0.33
Aurora storage - $0.01
RDS Data API requests - $0.00
Lambda, API Gateway, S3, Cognito, SES - $0.00 at this time

See you in the episode 02 :)

Top comments (0)