AWS Builder Center
Kisan Mausam: Hindi Weather Warnings for Farmers on AWS

Kisan Mausam: Hindi Weather Warnings for Farmers on AWS

Kisan Mausam (किसान मौसम)** is a Hindi-first Android app that turns raw weather data into clear warnings and crop advice for Indian farmers. This post covers the problem, our solution, how AWS powers it from the ground up, and the architecture behind it. - Code: https://github.com/kumarnikki/Kisan-Mausam - APK: https://github.com/kumarnikki/Kisan-Mausam/releases/download/v1.0.0/kisan-mausam-release.apk - Demo video: https://www.youtube.com/watch?v=aNWE_rO6-Y4

The problem

  • Farmers lose crops to heatwaves, heavy rain, frost, hail and drought, often with little warning.
  • Most weather apps show numbers ("41°C"), not decisions ("irrigate wheat before sunset").
  • Apps are mostly in English and cluttered, which excludes low-literacy users.
  • Rural networks are weak, so apps that need a constant connection fail when needed most.
  • Farmers need different warnings for tomorrow, next week and next month, not one forecast.

Our solution

  • Hindi-first app with large text, high-contrast outdoor theme, and voice input and output.
  • Three-horizon hazard warnings: days 1-3 (high confidence), days 4-14 (medium), days 15-45 (seasonal outlook), calibrated to IMD thresholds and crop growth stage.
  • Krishi Sahayak: a voice and chat advisor grounded in live weather, soil and ICAR guidance, with a one-tap KVK helpline.
  • Crop recommender: ranks the top 5 of 30 crops by season, soil, terrain, irrigation and rainfall outlook.
  • Alerts by push, SMS and email.
  • SOS 112: a loud siren plus an automatic SMS with GPS location.
  • Privacy built in: DPDP Act 2023 consent and one-tap account deletion.

How AWS powers Kisan Mausam

Everything runs in the Mumbai region (ap-south-1), which keeps data in India and latency low for our users. AWS gave us each building block without us running servers for it.
Need
AWS service
What it does for us
AI advice
Amazon Bedrock
Claude 3 Haiku writes grounded Hindi advisories from live farm context
Spoken Hindi
Amazon Polly (Kajal)
Natural Hindi and Indian English audio bulletins for low-literacy users
Many languages
Amazon Translate
Alerts and advice in 9 Indian languages
Auto-monitoring
AWS Lambda + Amazon EventBridge
A poller runs every 15 minutes, checks forecasts for active farms, and fires alerts without human action
SMS alerts
Amazon SNS
DLT-compliant transactional SMS, SOS messages and a hazard fan-out topic
Email
Amazon SES
Hazard warnings and weekly digests for FPOs and extension officers
Fast cache
Amazon DynamoDB
Geohash weather cache with a 30-minute TTL, plus an SOS audit table
Storage
Amazon S3
Encrypted weather and soil snapshots and audit logs with Glacier lifecycle rules
Core database
Amazon RDS (PostgreSQL)
Farmer accounts, farm profiles, alert preferences and delivery logs [CONFIRM]
Compute
Amazon EC2 (Docker + Nginx)
Runs the FastAPI backend
Delivery
Amazon CloudFront
Serves the web app and APK updates from Indian edge locations
Observability
Amazon CloudWatch
Custom metrics such as hazards dispatched and farms evaluated
Infrastructure
AWS CloudFormation + IAM
One template provisions the stack with least-privilege roles
AWS Pipline

We use the AWS SDK for Python (boto3) to call these services from the backend. [ADD ANY OTHER AWS OPEN SOURCE TOOL ONLY IF TRUE]

How a warning travels

  1. EventBridge triggers the Lambda poller every 15 minutes.
  1. Lambda fetches the forecast for each active farm and runs the IMD hazard rules.
  1. A hazard above threshold goes to SNS (SMS) and SES (email).
  1. Translate and Polly can turn the message into the farmer's language and voice.
  1. DynamoDB caches the data, S3 archives it, and CloudWatch records the metrics.

Why this mattered

  • Serverless scale: monsoon peaks mean sudden demand, and Lambda, SNS and DynamoDB scale without us managing servers.
  • Reach: Polly and Translate make the app usable for people who don't read English.
  • Reliability: alerts run on a schedule instead of waiting for the farmer to open the app.
  • Compliance: data stays in Mumbai, uses encryption, and follows DPDP and TRAI DLT rules.
  • Repeatable: CloudFormation lets us rebuild the whole stack with one command.

Architecture

  • Client: Flutter (Material 3) Android app with local caching.
  • Backend: FastAPI with async SQLAlchemy on EC2, behind Nginx in Docker.
  • Data sources: Open-Meteo (forecast, soil, seasonal), NOAA CPC (live ENSO), IMD thresholds.
  • AI cascade: Gemini, Amazon Bedrock (Claude 3 Haiku), and an ICAR rule-based fallback.
ARCHITECTURE DIAGRAM


The three-horizon risk engine

  • Horizon 1 (0-72 hours): heavy rain above 64.5 mm (extreme above 115.5 mm), heatwave at 40°C or more, frost at 4°C or less, high winds, hail and thunderstorms.
  • Horizon 2 (days 4-14): multi-day wet spells above 120 mm (waterlogging risk) and prolonged dry spells.
  • Horizon 3 (days 15-45): ECMWF seasonal rainfall and temperature outlooks plus live NOAA ENSO phase.
  • Thresholds adjust by crop stage (sowing, vegetative, flowering, grain-fill, harvest).

Built for bad networks

  • If the backend is unreachable, the app computes IMD warnings on the phone and fetches forecasts directly.
  • Weather and risk data are cached locally, so the dashboard still opens without signal.
  • The AI advisor falls back from cloud models to an ICAR rule engine, so a farmer always gets an answer.

Safety and privacy

  • The AI never generates chemical dosages. It recommends biological and cultural controls first.
  • One-tap dialing to the Kisan Call Centre (1800-180-1551) and the PMFBY crop insurance helpline (14447).
  • Granular consent and right to erasure under the DPDP Act 2023.

Testing and deployment

  • Backend tests:  python -m pytest tests -v . Flutter tests:  flutter test .
  • Deploy the stack with  aws cloudformation deploy  and set up the server with  deploy/aws-ec2-setup.sh .

Limitations

  • Warning thresholds follow IMD guidance but are not yet validated against local crop-loss data.
  • Forecasts are only as accurate as the data providers.
  • The AI advisor supports decisions and does not replace an agronomist.
  • [ADD ANY HONEST GAPS, e.g. services still being tested]

What's next

  • Validate thresholds with local historical data.
  • More regional languages in the app.

Try it

Which warning would change what a farmer does tomorrow morning?
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