
Raksha
An AI Agent That Fights Digital Arrest Scams in Hindi For AWS x WeMakeDevs Bharat Builds Tour — First Commit
Building Raksha: An AI Agent That Fights Digital Arrest Scams in Hindi
The problem
My family almost fell for a "Digital Arrest" scam call last year —
someone claiming to be a CBI officer, threatening arrest over a fake
case, demanding an immediate money transfer. These calls target
Indians in Hindi and regional languages, exploit unfamiliarity with
legal procedure, and rely on panic to bypass judgment. Existing
advice — "be careful" — doesn't help someone mid-call, frightened,
with no way to verify what they're hearing.
For First Commit, the opening hackathon of the AWS x WeMakeDevs
Bharat Builds Tour, I built Raksha: an AI agent that takes a
suspicious message or screenshot and, in seconds, returns a verdict,
an explanation in Hindi, and a ready-to-file police complaint draft.
What it does
- A user pastes a message or uploads a screenshot of a suspicious chat
- A deterministic rules engine scores it against known scam signals — urgency language, authority claims, secrecy demands, shortened links, UPI payment requests, explicit threats
- An AI agent reasons over the content alongside those rule scores and a library of known Indian scam playbooks (Digital Arrest, fake customs seizure, UPI refund scams, loan-app harassment, and more)
- The result: a verdict, a plain-English reasoning trail, a Hindi explanation with narrated audio, red flags, next steps, and a formatted NCRP-style complaint draft ready to copy and file
Architecture
- AWS Lambda (Python 3.12, Function URL) — the whole pipeline runs serverless, no server to manage
- Amazon Polly — synthesizes the Hindi explanation as spoken audio (voice: Kajal, neural engine), since the person most at risk may not read comfortably but understands spoken Hindi instantly
- Amazon DynamoDB — logs every case for a future pattern-detection layer
- Amazon S3 — stores uploaded screenshots and generated audio
- AWS SAM — the entire stack is defined as infrastructure-as-code
- AWS Amplify Hosting — hosts the React frontend with automatic deploys on push
- Google Gemini API — the reasoning and vision layer (see below for why)
Two real trade-offs worth naming
I originally built the reasoning layer on Amazon Bedrock (Nova
Pro). During the hackathon window, Converse API calls from the
Lambda's execution role returned a persistent
ValidationException:
Operation not allowed — even with full Bedrock and Marketplace IAM
permissions granted, and despite the same calls succeeding from a
CLI-authenticated user. I also built screenshot text extraction on
Amazon Textract, which returned a SubscriptionRequiredException
on the same account.Rather than lose hours to account-level issues outside my control, I
swapped both to Google Gemini — the reasoning layer, and vision-based
text extraction — while keeping everything else (Lambda, DynamoDB,
S3, Polly, the SAM-defined infrastructure, Amplify Hosting) on AWS.
It's not the architecture I set out to build, but it's the honest
one, and a good example of how a real deadline forces a real
engineering decision instead of a theoretical one.
What I learned
This was my first time deploying with AWS SAM end-to-end, my first
Lambda Function URL (skipping API Gateway entirely for simplicity),
my first time debugging a duplicate-CORS-header rejection (both the
Function URL config and the Lambda response were setting
Access-Control-Allow-Origin , which browsers reject outright), and
my first multilingual product build — getting Hindi and English to
coexist cleanly in both UI and generated content took more care than
I expected, especially around Devanagari typography and font pairing.Try it
Built for AWS x WeMakeDevs Bharat Builds Tour — First Commit ,
September 2026.
AI tools used: Google Gemini API, AI-assisted IDE coding.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article