AWS Builder Center
Building DOAB: Architecting an AI & Geospatial Resilience Platform on AWS for Urban Floods and Water Scarcity

Building DOAB: Architecting an AI & Geospatial Resilience Platform on AWS for Urban Floods and Water Scarcity

DOAB (दोआब, "two waters"): Detect, Order, Alert, Back-check. AI flood-and-drought response for Indian cities

Development

1. The Urban Paradox: Submerged Roads vs. Bone-Dry Taps

Every year across rapidly urbanizing Indian cities, we witness a harrowing climate contradiction:
  • During monsoons, localized downpours submerge underpasses and low-lying arterial roads in minutes. Gig economy delivery riders and daily commuters find themselves trapped in hazardous waterlogged choke points without real-time topographic warnings.
  • Just months later during summer heatwaves, groundwater tables collapse, forcing entire neighborhoods to depend on emergency municipal water tankers that struggle through chaotic dispatch bottlenecks.
Traditional municipal tools are either static paper disaster maps or reactive complaint helplines. By the time municipal teams respond, vehicles are stranded, logistics stall, and relief is delayed.
To solve this, our team (Contrarians) built DOAB (दोआब) — named after the historic term for land between converging rivers. DOAB operates on a simple yet powerful 4-pillar loop: Detect · Order · Alert · Back-check.
In this article, I’ll walk through how we architected and deployed DOAB on AWS to transform reactive municipal crisis management into an intelligent, proactive resilience mesh.



2. High-Level System Architecture on AWS

From Day 1, our architecture was designed around three non-negotiables: sub-second global latency for field workers, high-precision geospatial computation, and cost-effective scalability.
Plain text
[ Internet / Edge ] │ Amazon CloudFront (CDN) ├── Global Edge Caching & SSL Termination └── Origin: Amazon S3 (Vite + React PWA Static Build) │ ┌───────────────────┴───────────────────┐ ▼ ▼[ Client Browser / PWA ] [ Android / Native App ] │ │ └───────────────────┬───────────────────┘ │ HTTPS / TLS ▼ Amazon EC2 Instance ┌───────────────────────────────────────────────┐ │ Docker Compose Multi-Service Mesh │ │ │ │ • Node.js API Gateway (Express / Auth / SQS) │ │ • Python FastAPI ML Nowcasting Engine │ │ (60-min rainfall run-off & terrain slope) │ └───────┬──────────────┬───────────────┬────────┘ │ │ │ ▼ ▼ ▼ Amazon RDS Amazon Location AWS Open Data Registry PostgreSQL + PostGIS Service Copernicus DEM (30m GLO-30) (Spatial indexing) (Routes / Maps) (Terrain slope & hydrology) │ │ ▼ ▼ Amazon SQS Amazon SNS (Buffer queue) (Push / SMS Alerts)

The AWS Building Blocks:

  1. Amazon CloudFront & Amazon S3: Static hosting for our responsive React 18 single-page app and PWA assets, delivering global micro-caching and TLS termination.
  1. Amazon EC2 (t3/t4g Dockerized): Orchestrates our backend microservices — a Node.js routing controller and a Python FastAPI analytical engine running our hydrological run-off model.
  1. Amazon RDS PostgreSQL with PostGIS: Our spatial database storing waterlogging choke points, historical telemetry, and municipal tanker dispatch queues.
  1. Amazon Location Service (ALS): Powers our forward geocoding, interactive vector map tiles, and custom route calculations that prioritize high-elevation road segments over flood basins.
  1. Copernicus DEM on the AWS Open Data Registry: Provides 30-meter global elevation raster data, allowing us to compute slope gradients and natural accumulation basins with zero infrastructure storage overhead.
  1. Amazon SQS & Amazon SNS: Decouples heavy crowd-sourced reports and instantly broadcasts localized hazard alerts to citizens and emergency personnel.



3. Deep Dive: How the 4 Pillars Work

① Detect — 60-Minute Predictive Flood Nowcasting

Most flood maps only report where water has already accumulated. DOAB looks forward.
By pulling 30-meter Copernicus DEM tiles directly from the AWS Open Data S3 buckets, our FastAPI service calculates local topographic depression indices and slope run-offs. When combined with incoming Doppler weather radar and rainfall telemetry, DOAB computes a 60-minute predictive inundation curve.
On the municipal web dashboard (rendered in full 3D using hardware-accelerated MapLibre GL), city planners can see which road segments and underpasses will submerge before the first vehicle gets stuck.

② Order — Dynamic Municipal Tanker Dispatch

During drought conditions, DOAB transitions seamlessly to Heat & Water Scarcity Mode.
Instead of manual phone calls, municipal authorities see an automated priority queue of water-stressed clusters generated from citizen telemetry and reservoir sensor metrics. The engine calculates delivery time windows and assigns tankers to optimal routes that avoid road construction and terrain obstructions.

③ Alert — Safe Elevation Routing for Gig Workers

For citizens and gig delivery partners navigating on two-wheelers, getting caught in 3 feet of water in an underpass can mean destroyed livelihoods or worse.
Using Amazon Location Service Routes API, DOAB computes a Safe Elevation Path. Rather than defaulting to the shortest path through a low-lying valley or waterlogged tunnel, the algorithm weighs route segments against our elevation database, steering drivers along ridge lines and safe elevations. The route can also be bookmarked for 100% offline access when cellular networks fail during severe storms.

④ Back-check — The Crowd-Verified Ground-Truth Loop

Here is where DOAB closes the loop: when a delivery rider reaches their destination, the app prompts a simple 1-tap confirmation:
"Was the 8th Main underpass passable? [Dry · Shallow · Submerged]"
This ground-truth data is ingested via an asynchronous queue (Amazon SQS) and back-checked against our ML prediction model. If multiple drivers report water clearing earlier than predicted, the model auto-calibrates in real time. This crowd-sourced feedback prevents false alarms and builds genuine trust with city residents.



4. What We Learned & Why AWS Made the Difference

Building an end-to-end climate resilience platform in a fast-paced hackathon setting came with steep challenges, particularly around geospatial data rendering and high-frequency reporting. Three aspects of AWS stood out:
  1. AWS Open Data Registry is a Game Changer: We did not need to host gigabytes of heavy topographic datasets on our own disks. Accessing Copernicus GLO-30 DEM directly on AWS gave us instant, reliable terrain intelligence.
  1. Amazon Location Service Simplifies Complex GIS: Instead of stitching together separate, fragile mapping APIs, ALS gave us unified map tiles, reverse geocoding, and routing under strict AWS security boundaries and IAM policies.
  1. Decoupled Architecture Kept the App Snappy: Offloading crowd reports to SQS meant that our mobile users experienced instant, snappy interactions even when our analytical backend was running heavy hydraulic calculations in the background.



5. What’s Next for DOAB

While we have deployed a fully functioning MVP across Web and Mobile, our roadmap includes:
  • IoT Ultrasonic Culvert Sensors: Connecting physical bridge and drain sensors via AWS IoT Core for millimeter-accurate water level telemetry.
  • WhatsApp & SMS Bot Integration: Enabling citizens without smartphones to request tanker dispatches or query safe route elevations via simple SMS and IVR powered by Amazon Connect.
  • Cross-City Scaling: Expanding our catchment analysis to multiple flood-prone metropolitan regions across India.



6. Conclusion

Resilient cities aren't built on static maps; they are built on closed feedback loops where municipal authorities, predictive AI, and frontline citizens communicate seamlessly. With AWS providing the geospatial, compute, and serverless foundation, DOAB proves that real-world climate adaptation can be fast, predictive, and accessible to everyone.
A huge thank you to WeMakeDevs, AWS, and the hackathon mentors for creating a platform to build technology that matters.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article