AWS Builder Center

Forecasting Air Quality with NASA Data: Building Whiff on AWS Serverless

Learn how Team Arceus built Whiff, a Progressive Web App that leverages NASA satellite data and a 100% serverless AWS architecture to give users a 48-hour heads-up on incoming smoke.

Every winter, seasonal crop residue burning hundreds of kilometers away combines with stagnant weather to push the air quality in cities like Delhi into the danger zone. The problem? Most residents only find out after they step outside and smell the smoke.
As a frontend developer, I teamed up with a cloud architect to build Whiff for the WeMakeDevs Bharat Builds Hackathon. Whiff is an anticipatory air-quality web app that gives users a 24- to 48-hour heads-up before the smoke arrives. Here is a look under the hood at how we built it using a 100% serverless AWS architecture.

The Frontend: A Fast, Bilingual PWA

Our goal was to make Whiff accessible to everyone—from school principals to delivery riders. I built the frontend as a Progressive Web Application (PWA) using React 18 and Vite.
Because our users might be checking the app on the go with spotty networks, the PWA utilizes Service Workers and Workbox for offline asset caching. It also features a "Plan My Day" guide with hourly estimates, native support for both English and Hindi, and light/dark modes. But a fast frontend is nothing without a robust, scalable backend.

The AWS Serverless Architecture

We wanted to spend our hackathon time writing code, not provisioning servers. We leaned entirely into AWS Serverless to handle our data pipeline, which processes live NASA FIRMS (Fire Information for Resource Management System) active fire detections and wind dispersion models.
Here is how our stack breaks down:
  • Static Hosting with Amazon S3: The compiled frontend assets (HTML, CSS, JS, and web manifests) are stored securely in a private S3 bucket.
  • Routing with Amazon API Gateway: All client requests ( /smoke ,  /day ,  /replays ) are routed through a single HTTPS entry point via API Gateway.
  • Compute with AWS Lambda: We deployed 6 modular microservices running Python 3.12. Using the open-source AWS SDK for Python (Boto3), these functions handle everything from geographic clustering to API responses with zero idle compute costs.
  • Automation with Amazon EventBridge: Fire data changes constantly. We set up an EventBridge Scheduled Rule to run our ingestion Lambda function at a fixed 1-hour rate, silently fetching and processing the latest satellite data in the background.
  • Caching with Amazon DynamoDB: This was our secret weapon for performance. Calling external weather and NASA APIs on every user load would quickly hit rate limits. Instead, our EventBridge worker processes the clusters and writes the payloads to a DynamoDB NoSQL cache. When a user opens Whiff, the Lambda function reads directly from DynamoDB, delivering sub-100ms response times.

Rethinking "Streaks"

One of my favorite features we implemented is "Smart Streaks." Many fitness apps reward you for going outside every day. Whiff actively tells you to stay indoors during hazardous spikes, and rewards your streak for making that safe choice. At the end of the week, users get a generated "Weekly Whiff" card summarizing their exposure reduction.

Final Thoughts

Building Whiff taught us how to seamlessly decouple a data pipeline using EventBridge and Lambda, and how critical NoSQL caching is for scaling third-party data. By relying on AWS, we built a highly responsive, localized tool that can genuinely help people protect their respiratory health.
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