
EcoRoute AI: Building Pollution-Aware Route Planning with AWS Serverless Services
Explore how EcoRoute AI combines route planning, estimated PM2.5 exposure, and AWS cloud services to help users compare journeys beyond travel time and distance. Discover the architecture, technology stack, challenges, and future possibilities of pollution-aware navigation.
EcoRoute AI: Know Your Route. Understand Your Exposure.

Introduction
Navigation applications have made travelling through cities easier by helping users find routes based on distance, travel time, and traffic conditions. However, another factor deserves attention when planning a journey: the environmental conditions along the route.
EcoRoute AI is a pollution-aware route-planning project that explores how environmental information can complement traditional navigation. Instead of focusing only on the fastest or shortest journey, the application helps users compare available routes using travel time, distance, and estimated PM2.5 exposure.
The goal is to make environmental information easier to understand and help users make more informed travel decisions.
Project links
- Live application: https://main.d3txif33djiy59.amplifyapp.com/
- GitHub repository: https://github.com/deveshsinghal09/ecoroute-ai
- Youtube link: https://youtu.be/o09Lg793FHE
-
The Problem
Most navigation experiences prioritize reaching a destination quickly. Although this is useful, users may not have enough information to understand how estimated pollution exposure could differ between alternative journeys.
Air quality can vary across urban areas because of traffic emissions, weather, pollution sources, and local environmental conditions. Choosing a route based only on travel time does not communicate these environmental considerations.
EcoRoute AI explores a way to bring these factors together. It presents route information alongside available environmental data, helping users examine the potential trade-offs between convenience and estimated pollution exposure.
The project does not assume that every alternative route is cleaner. Instead, it aims to make available estimates and their limitations visible to the user.
How EcoRoute AI Works
The application provides several connected experiences.
1. City Overview and Air-Quality Information
The dashboard presents environmental information for a selected area, including available PM2.5 data and data-coverage indicators.
PM2.5 refers to fine particulate matter with a diameter of 2.5 micrometres or less. These particles are an important air-quality concern because they can penetrate deep into the respiratory system.
Coverage indicators help users understand where information is available. Coverage should not be confused with air quality: having complete data coverage does not necessarily mean that the air is clean.
2. Route Planning
Users can enter a starting point and destination, select a travel mode, and configure available route preferences.
The interface is designed to support route planning for different travel needs, including driving, walking, and cycling. Users can then request a comparison of available route alternatives.
3. Route Comparison
EcoRoute AI presents route information using multiple factors, including estimated travel time, distance, and pollution exposure.
For example, a displayed comparison might show one route taking less time while another requires a slightly longer journey. The application can place the available exposure estimates alongside these values so users can review the trade-offs.
The displayed values are estimates, not direct measurements of pollution at every point along a road. Their reliability depends on the source data, its spatial resolution, and the estimation method.
4. Insights and Wearable Experience
The Insights experience is designed to explain route trade-offs in understandable language rather than presenting numbers alone.
The project also includes a smartwatch-style interface that demonstrates how journey-related information could be presented through a wearable device. Live wearable measurements require compatible hardware, a working connection, appropriate permissions, and reliable sensor data.
System Architecture

EcoRoute AI uses a web frontend, a Python backend, external data providers, and AWS cloud services.
Frontend and Identity
The frontend is built with React, with AWS Amplify providing hosting for the web application.
Google Maps integration provides the map interface and supports route-related visualization. Amazon Cognito is used for user identity and authentication, while Amazon API Gateway provides the entry point for backend API requests.
AWS Secrets Manager is intended to keep sensitive provider credentials out of browser-facing code.
Backend Processing
The backend uses Python FastAPI with Mangum and AWS Lambda.
This layer handles application API requests and route-related processing. The route engine is designed to consider geographical information and configured factors, estimate PM2.5 exposure from available data, and rank route alternatives according to the selected preferences.
External providers, including Google Maps, OSRM, and Open-Meteo, are represented in the architecture for route and environmental information.
The quality of the results depends on provider availability, the data returned, and the assumptions used by the estimation process.
Environmental Data Pipeline
The architecture also includes an environmental data-ingestion pipeline.
AWS Lambda can collect and validate source data. Amazon S3 provides storage for raw and processed datasets, while Amazon SQS supports message buffering and retry handling. Additional processing can normalize and organize data before it is used by the application.
This separation helps distinguish data collection from the user-facing route-planning experience.
Application Data and Storage
Amazon DynamoDB is used for structured application records, while Amazon S3 supports dataset and report storage.
The architecture also includes a Lambda-based archival process intended to handle consented measurements. Any collection or retention of personal or device-related information should follow appropriate consent and access controls.
Machine Learning and Monitoring
The architecture includes a potential machine-learning workflow using AWS Step Functions, Amazon SageMaker AI, S3, and Lambda. These services can support dataset validation, model training, artifact storage, and inference when configured.
AWS WAF, Amazon CloudWatch, and Amazon SNS are included for application protection, logging, monitoring, and operational notifications.
An important distinction is that the architecture diagram marks several components as disabled, optional, or gated. In particular, it indicates that a live Delhi-specific machine-learning model is not enabled. The presence of a service in an architecture diagram does not by itself mean that the service is deployed or actively processing production traffic.
Why AWS?
AWS offers a set of managed services that can support the different responsibilities of a system like EcoRoute AI.
- AWS Amplify supports frontend hosting and deployment.
- Amazon Cognito provides authentication capabilities.
- Amazon API Gateway exposes backend APIs.
- AWS Lambda runs backend logic without requiring users to manage servers.
- Amazon S3 stores datasets and generated reports.
- Amazon DynamoDB supports structured application data.
- Amazon SQS helps decouple data-processing tasks and handle retries.
- AWS Secrets Manager supports secure credential management.
- Amazon CloudWatch provides logs, metrics, and alarms.
- Amazon SageMaker AI and Step Functions can support future machine-learning workflows when enabled.
Using managed services can reduce infrastructure-management work and allow individual parts of the application to evolve independently. Actual cost, reliability, and scalability still depend on configuration, workload, and operational practices.
Challenges and Lessons
One of the main challenges in pollution-aware navigation is the difference between regional air-quality information and conditions on a particular street.
A regional forecast may provide useful environmental context, but it cannot automatically establish that one road has lower pollution than another nearby road. More precise route-level comparisons require sufficiently detailed data and a validated estimation method.
Other challenges include keeping route information current, managing external API dependencies, handling missing data, protecting user information, and clearly communicating uncertainty.
A useful design principle is to avoid presenting unavailable environmental data as if it were a reliable measurement. Missing or coarse data should be communicated honestly, and exposure estimates should not be presented as medical advice.
Future Improvements
Several areas could strengthen EcoRoute AI over time:
- Integrate more frequent and geographically detailed air-quality measurements.
- Validate exposure estimates against suitable reference measurements.
- Improve traffic-aware route comparisons where reliable data is available.
- Evaluate route-ranking methods using documented test cases.
- Develop personalized preferences with transparent explanations.
- Test wearable connectivity and sensor integration with compatible devices.
- Enable and validate machine-learning workflows only when suitable datasets and deployment controls are available.
- Improve monitoring, cost controls, security reviews, and automated testing.
These improvements would help establish whether the application can provide reliable and useful environmental comparisons across different journeys.
Conclusion
EcoRoute AI explores how route planning, environmental information, and cloud computing can work together to support more informed urban travel decisions.
By presenting travel time and distance alongside estimated PM2.5 exposure, the project encourages users to consider more than speed when evaluating their journey options.
The long-term vision is to make environmental context more accessible during everyday navigation while remaining transparent about data quality, estimation uncertainty, and system limitations.
EcoRoute AI — Know Your Route. Understand Your Exposure.
Team
Mayank Gupta, Devesh Raj, and Devesh Singhal.
Disclaimer
Pollution and exposure values are estimates based on available environmental data and the application's calculation methods. They are not guaranteed street-level measurements, do not establish medical risk for an individual journey, and should not be considered medical advice. Features marked as optional, disabled, or gated in the architecture may require further implementation or deployment.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article