AWS Builder Center
JunkSnap: snap a waste dump, get it on the map, send the right office a letter

JunkSnap: snap a waste dump, get it on the map, send the right office a letter

How we built JunkSnap on AWS for Environmental Hacks: in-app photos, privacy blur with Rekognition, a Bedrock Nova vision judge, one site per dump, and honest letters to the local body. Plus what broke on our first field test in Jodhpur.

We are a team of three. For the Environmental Hacks hackathon we built JunkSnap, an app where anyone can photograph a waste dump and turn it into evidence that the right office can act on. This post explains what it does, how we built it on AWS, what went wrong, and what we saw when we took it out on the street.
A short tour of the JunkSnap web app: the map of Jodhpur, a site, the areas map and a report


The problem

Walk around any Indian city and you will find empty plots full of plastic, rubble and kitchen waste. The usual reaction is to blame the city. Sometimes that is fair. But often people dump there because there is no bin nearby, or because pickup never comes. So a dump can have three causes:
  1. The city does not clear it.
  1. People keep dumping.
  1. There is nowhere legal to put waste.
Nobody measures which one it is. So nobody knows who should act, and nothing happens.
Cows grazing in a spread of plastic and household waste on an empty plot by a road in Jodhpur


What JunkSnap does

Three app screens: the report camera, a site with its blurred photo and 1 of 10 progress, and a site's card on the map

  • Snap. You take a photo with the in-app camera. You can't upload from the gallery, so every photo is fresh and has a real GPS fix. You can also film a short video while walking, and the server picks the clear frames.
  • Blur. Before any public copy exists, the server blurs faces and number plates. The original stays private.
  • Check. Several models look at the photo and decide if it really shows waste.
  • Map. Reports of the same kind within 20 metres become one site. Each site shows its local body, MLA seat and MP seat.
  • Confirm. Neighbours can back a site. Once 10 different people back it, it counts as verified.
  • Letter. For any open site, JunkSnap drafts a letter to the head of the local body, copied to the MLA and MP. It quotes the Solid Waste Management Rules, 2026, and a checker makes sure every quote matches the official text word for word. The letter says honestly how many residents have reported the spot. Nothing is sent automatically. The resident files it.
  • No bin. You can't photograph a missing bin, so you can report "there is no dustbin within 1 km of here" instead.
  • Area scores. Each area gets scores for city clearing, citizen dumping and access to bins, but only after it has 10 verified reports. Until then it shows counts only.
Three app screens: a site's facts and location, the draft letter screen in sample mode, and a site shown in Hindi


How a report flows through AWS

Everything runs in the Mumbai region (ap-south-1).
Diagram of the six steps a JunkSnap report takes through AWS: snap to S3 with KMS, queue on SQS, moderate and blur with Rekognition, verify with the ml service and Bedrock, place and merge with Amazon Location and DynamoDB, then map and letter

  1. Upload. The phone asks our API for a presigned URL and uploads the photo straight to a private Amazon S3 bucket, encrypted with AWS KMS. The photo never passes through our servers.
  1. Queue. The report goes onto Amazon SQS. A worker on Amazon EKS picks it up. If a step fails, SQS retries it, and a dead-letter queue catches anything that keeps failing.
  1. Moderate and blur. Amazon Rekognition checks for unsafe images, then finds faces, text and vehicles. We blur faces and anything that looks like a number plate, and write only the blurred copy to the public bucket.
  1. Verify. Our ml service scores the blurred photo with Rekognition labels, a YOLO detector we trained, and a SigLIP image classifier. Then a vision model on Amazon Bedrock (Amazon Nova Lite, with Nova Pro as a fallback) answers yes, no or unsure for each part of the claim. We combine all of this into one score. Every decision stores which model and version made it.
  1. Place. Amazon Location Service gives the state, district and town. Our own seat maps add the assembly and Lok Sabha seats.
  1. Save. Sites, reports and votes live in Amazon DynamoDB.
  1. Serve. The API and blurred photos go through Amazon CloudFront. The web app is on AWS Amplify Hosting. Sign-in uses Amazon Cognito.
Other parts:
Architecture diagram: the web and Android apps reach AWS Amplify Hosting and Amazon CloudFront; an Amazon EKS Auto Mode cluster runs the api, worker, ml, scores and crawler; data in S3 with KMS, DynamoDB and SQS; AI with Rekognition, Bedrock Nova and Amazon Location; built with ECR, Secrets Manager, CloudFormation and IAM; sign-in with Cognito

  • Bedrock also writes the letter text, checks residents' notes before they show, and summarises them.
  • Amazon ECR holds our three container images.
  • AWS CloudFormation sets up one stack per stage.
  • EKS Auto Mode means we never had to manage nodes.
  • EKS Pod Identity gives each service its own narrow IAM role.

Why we picked Nova Lite as the judge

We tested several judges on 224 public test photos. Amazon Nova Lite was the most accurate on "is this a waste dump" (0.929) and also the cheapest, at about $0.17 per 1,000 photos with a median of 1.5 seconds. Nova Pro scored a bit lower. The Bedrock Converse API made it easy to fall back from one model to another by changing a model id.
One honest note: all our model numbers come from public datasets. We have not yet measured accuracy on Jodhpur photos.

What went wrong, and how we fixed it

Claude on Bedrock was not available. The models showed up in the catalog, but every call failed until a use case form was filled in. We found out from our logs and moved everything to Nova.
No number plate detection. Rekognition doesn't have one. We combine text boxes with vehicle boxes to decide what to blur. If it finds people or vehicles but no face or plate, we still blur them, because we never trust "found nothing".
Duplicate sites. On our field test, two people photographed the same dump from a metre apart and got two separate sites. There were two causes:
  1. Our photo similarity check was too strict for close-up shots from different angles.
  1. When phones on a slow connection sent several reports at once, the worker handled them in parallel. Each one looked for a nearby site, found nothing, and created its own. DynamoDB global secondary indexes can't do strongly consistent reads, so even back-to-back reports could miss a site created a moment before.
We fixed it in three steps:
  • Same-type reports within 20 metres now always join one site.
  • Reports in the same area take turns when choosing a site.
  • The worker remembers sites it just created until the index catches up.
Then we wrote a script that folded the 11 existing duplicates into their sites. It uses DynamoDB conditional writes, so it could run safely on production while the worker kept going.
Location permission. In the Android app, the browser's permission check didn't match the app's real permission. So voting looked possible but failed. Now the app asks for location when you tap, and if it's blocked, it tells you how to turn it on.

The field test

On 11 October, four of us walked around Jodhpur for about two hours and filed 121 reports. 114 passed the checks, 7 were rejected. We looked at each rejection:
  • a photo taken indoors;
  • two video frames that were too dark;
  • a "dirty water" photo of a dry plot;
  • a bin report with no bin in it;
  • one unclear rubble photo;
  • one photo the moderation step flagged as graphic.
After merging duplicates, there are 44 open sites. None is verified yet, because that needs 10 different people per site and there were only four of us. That is the honest state of the pilot.
Three app screens: the map of Jodhpur with assembly seat boundaries, the areas map, and the ranking of areas

We also learned that ward boundaries are the missing piece. Nobody has published an open map of Jodhpur's 2025 wards. We built rough wards from the official ward list, but we don't use them, because a wrong ward would send a letter to the wrong councillor.

What's next

  • Get real neighbours to back the sites, so the first ones become verified.
  • Measure model accuracy on Jodhpur photos.
  • Replace our rough ward shapes with reviewed ones.
  • Add more cities beyond the Jodhpur pilot.

Try it

Built by Hemang, Girish and Harshit for Environmental Hacks.
AI tools used: Claude Code.
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