AWS Builder Center

Building WorkWise: How I Used AWS Serverless, Bedrock, and Polly to Protect Construction Workers from Extreme Heat

Across India, over 50 million construction workers build infrastructure under extreme weather. In northern regions like Delhi, summer temperatures exceed 47°C. In coastal cities like Mumbai and Chennai, temperatures hover around 35°C, but 85% humidity prevents sweat from evaporating, causing heat exhaustion early in the morning.



By Rishi Singh

The Problem: The 12 to 3 PM Myth on Indian Sites

Across India, over 50 million construction workers build infrastructure under extreme weather. In northern regions like Delhi, summer temperatures exceed 47°C. In coastal cities like Mumbai and Chennai, temperatures hover around 35°C, but 85% humidity prevents sweat from evaporating, causing heat exhaustion early in the morning.
Today, site supervisors rely on a standard thumb rule: "Shut down all work from 12:00 PM to 1:00 PM."
To test if this actually keeps workers safe, I ran an audit using historical ERA5 weather data over Delhi summer heatwaves. The findings were surprising:
  • Over 80% of working hours outside the 12–2 PM break breached occupational heat safety limits. 
  • Meanwhile, safe indoor, basement, or shaded tasks that could have proceeded during midday were halted indiscriminately, causing weeks of unnecessary project delays.
I built WorkWise —a mobile-first, climate-aware scheduling and field communication copilot for site supervisors.



Core Philosophy: "The Engine Decides; AI Explains"

In industrial safety, AI hallucination is dangerous. You cannot let an LLM guess weather parameters, estimate thermal strain, or override safety gates.
I designed WorkWise with a strict rule:
│ 1. SENSING & THERMAL PHYSICS (FastAPI / thermofeel) │
│ Real-time weather -> Physical WBGT calculations │
├──────────────────────────────────── ┤
│ 2. DETERMINISTIC SAFETY GATES (Python / NIOSH) │
│ Heat thresholds, CAQM dust bans, wind & rain gates │
├─────────────────────────────────────┤
│ 3. MULTIMODAL COMMUNICATION (Bedrock & Polly) │
│ Grounded supervisor copilot + Hindi audio dispatch |
The AI has zero authority to change safety limits. Its job is to turn complex thermal metrics into plain, actionable advice in Hindi and English.



Architecture Overview

WorkWise is built on a 100% serverless AWS architecture deployed in the  ap-south-1  (Mumbai) region:
Here is how the services work together:
  1. AWS Lambda + Mangum (Python 3.12): Runs our FastAPI backend. It computes physical heat strain and generates the task schedule in under 300ms.
  1. Amazon API Gateway (HTTP API v2): Routes traffic via a  $default  stage with native CORS and route throttling (20 req/s) to protect demo endpoints from spam.
  1. Amazon Bedrock (Converse API): Powers the Supervisor Copilot using Amazon Nova Lite, answering operational questions grounded strictly in the validated schedule.
  1. Amazon Polly (Neural Engine): Synthesizes daily morning assembly briefings using the bilingual  Kajal  voice ( hi-IN  /  en-IN ), making instructions clear for multilingual workers.
  1. Amazon S3: Stores generated audio briefings with an automated 7-day lifecycle cleanup rule.
  1. AWS Amplify: Hosts the React 19 Progressive Web App with global HTTPS distribution.
(Add a screenshot of your WorkWise dashboard / 4-tier heatmap here)



Key Implementation Highlights

1. Real Heat Stress Calculations (Liljegren WBGT)

Instead of simple temperature readings, WorkWise implements the peer-reviewed Liljegren (2008) Wet-Bulb Globe Temperature (WBGT) algorithm. It balances air temperature, relative humidity, wind speed, and solar radiation over a natural wet-bulb wick and 25mm black globe.
For shaded and basement work, we run the same physics model with solar irradiance set strictly to zero (SW=0SW=0). This mathematically proves when indoor work can safely continue even during extreme outdoor heat.

2. Bedrock Converse API with Safety Guardrails

To answer supervisor questions, I used Bedrock's Converse API. It provides a unified message schema, making it easy to test and swap models.
To ensure safety integrity, responses are checked against regex guardrails. If the model generates overclaims like "100% safe" or tries to give medical advice, the system automatically falls back to deterministic templates:
Plain text
pythonimport boto3bedrock = boto3.client("bedrock-runtime", region_name="ap-south-1")def ask_copilot(question: str, plan_summary: dict): prompt = f"Plan Summary: {plan_summary}\nSupervisor Question: {question}" response = bedrock.converse( modelId="apac.amazon.nova-lite-v1:0", messages=[{"role": "user", "content": [{"text": prompt}]}], system=[{"text": "Explain safety decisions citing NIOSH criteria. Never promise 100% safety."}] ) answer = response["output"]["message"]["content"][0]["text"] return audit_safety_guardrails(answer)

3. Morning Assembly Audio via Amazon Polly

In noisy outdoor environments with bright sunlight glare, workers don't read text on screens. Using Polly's neural  Kajal  voice, WorkWise generates a clear 40-second audio briefing:
Plain text
pythonpolly = boto3.client("polly", region_name="ap-south-1")response = polly.synthesize_speech( Text="सभी साथी ध्यान दें। आज दोपहर गर्मी अधिक रहेगी। पानी हर 20 मिनट में पिएं।", OutputFormat="mp3", VoiceId="Kajal", Engine="neural")
The authentic pronunciation and cadence make it sound like a natural briefing from a site safety officer.



What I Learned as an AWS Builder

  1. Amazon Nova Lite is Ideal for Fast, Low-Cost AI: Finding models available out-of-the-box in  ap-south-1  without waiting for console request approvals was a huge plus. Nova Lite provided near-instant responses with zero onboarding delay.
  1. Build Serverless in AWS CloudShell: When developing on Windows, Docker volume mounting issues can occasionally complicate containerized SAM builds. Using AWS CloudShell gave me a pre-authenticated Linux environment where  sam build && sam deploy  ran smoothly.
  1. HTTP API v2 Over REST API v1: For single-page apps, HTTP API v2 is lighter, cheaper, and has built-in throttling to prevent unexpected billing.



Conclusion

WorkWise combines occupational health science with modern cloud engineering. By using AWS Lambda for deterministic calculations and Amazon Bedrock and Polly for multimodal communication, construction safety can move from crude rules of thumb to intelligent, life-saving planning.
  • Live API Endpoint:  https://ur0qwu5k8d.execute-api.ap-south-1.amazonaws.com 
Plan smarter. Work safer.
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