
WaterWatch — AWS Builder Center Blog Draft
WaterWatch: a flooded-street reporter, built live on AWS in one hackathon weekend
Every monsoon, the same thing happens: a street that was fine yesterday is suddenly knee-deep in water today, and nobody finds out until they're already standing in it. There's no shared, real-time way to know which streets are affected right now.
So that's what I built for the Heat and Water track of Environmental Hacks (Bharat Builds Tour, WeMakeDevs × AWS): WaterWatch, a crowd-reporting tool. You pin a flooded street on a map, rate how bad it is, and it shows up instantly for everyone else nearby.
No "flooding is a huge problem" throat-clearing. Let's build.
The shape of it, in one line
Plain text
report = location + severity + photo (optional)map = all reports, color-coded, loaded live
That's genuinely the whole product. Everything else is plumbing to make those two lines real.
The stack, one sentence each
- Amazon S3 — hosts the frontend as a static website. One HTML file, no build step, no server to patch.
- Amazon API Gateway (HTTP API) — exposes
POST /reportsto save a new report andGET /reportsto list them. This is the only door into the backend.
- AWS Lambda (Python 3.12) — one function, branching on HTTP method, does both jobs. No servers to manage, scales to zero when nobody's using it.
- Amazon DynamoDB — stores each report (location, severity, timestamp, photo). On-demand capacity, so it costs nothing at rest and scales automatically if it actually gets used.
- Leaflet.js + OpenStreetMap + Nominatim — the map itself and street search, entirely free and open-source, no API key required.
A small bug I'm glad I hit
Wiring up API Gateway, I stared at a
{"message":"Not Found"} error that looked exactly like a CORS problem — browser console screaming about blocked origins. Turned out my endpoint URL was just missing the /reports path at the end. API Gateway's 404 responses don't carry CORS headers, so the browser reports any 404 as a CORS failure. One missing path segment, twenty confused minutes. Now you know to check the URL first.Run it yourself
Plain text
waterwatch/├── index.html # frontend — map, form, all client-side logic├── lambda_function.py # backend — handles GET and POST on /reports└── README.md
Plain text
# 1. Create an S3 bucket, enable static website hosting, upload index.html# 2. Create a DynamoDB table named WaterReports, partition key reportID (String)# 3. Create a Lambda function (Python 3.12), paste in lambda_function.py,# attach a role with DynamoDB access# 4. Create an API Gateway HTTP API:# POST /reports -> your Lambda# GET /reports -> your Lambda# Enable CORS: Allow Origin *, Methods GET/POST/OPTIONS, Headers Content-Type# 5. Update API_ENDPOINT near the top of index.html's <script> tag# with your invoke URL + /reports, re-upload to S3
Sneak Peak : little little😃

Why this, why now
A small problem solved well beats a big one solved vaguely. WaterWatch doesn't fix urban drainage — it just makes sure the person two streets away knows to take a different route, and over time, gives a city a real picture of exactly where the water keeps coming back.
Built for Environmental Hacks — Heat and Water track — Bharat Builds Tour, WeMakeDevs × AWS.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article