AWS Builder Center

TERRA: Turning Waste into Actionable Intelligence with AI and AWS

Discover how AI can turn mixed-waste images into actionable insights for material identification, recycling, and environmental impact assessment. Learn how AWS server less services and AI-powered vision pipelines work together to make waste analysis smarter and more scalable.

TERRA: Turning Mixed Waste into Real-Time Climate Intelligence
Why We Built This?
  • If you visit almost any municipal recycling facility, you will see workers standing over conveyor belts, trying to manually sort through chaotic piles of trash. It is hazardous, exhausting, and remarkably slow. Despite our best intentions, over 70% of recyclable items still end up in landfills or our oceans simply because facilities cannot identify and separate materials quickly enough.
  • Operators constantly ask: What is actually on this belt? Is it contaminated? And what is its real carbon footprint? We wanted to answer those questions in milliseconds.
What We Built & The Stack:
  • We built TERRA, an autonomous computer vision and waste intelligence platform that gives recycling streams real-time "eyes and a brain."
  • Using Next.js 16 (App Router), TypeScript, and Tailwind CSS, we designed an interactive Audit Workspace that processes live camera feeds and high-resolution photo audits. Here is how our pipeline works:
  • High-Density Detection: Unlike basic classifiers that only spot one item, TERRA identifies 10 to 30 distinct objects per image (PET bottles, aluminum cans, flexible films, cardboard, e-waste) and maps them with precise bounding boxes. Circular Economy Metrics: The engine calculates exact material weight fractions, a 0–100 recyclability score, and the CO₂-equivalent carbon offset. Resilient Key Pooling: To survive sudden traffic spikes and rate limits, we built an automatic model failover system, paired with an offline edge simulator so facilities never face sorting downtime.
  • Hardware-Ready API: We exposed REST endpoints (/api/v1/classify-external) so smart bins and robotic sorting arms can integrate with our engine directly.
Where AWS Powers TERRA:
  • We wanted an architecture that could scale with high-throughput facilities without burning money on idle servers. AWS gave us that server less backbone:
  • AWS Amplify Hosting (SSR / WEB_COMPUTE): Hosts our full-stack Next.js app globally on Amazon CloudFront edge nodes, giving operators lightning-fast load times and automated CI/CD directly from our GitHub repository.
  • AWS Lambda & Server-less Compute: Handles our backend heavy lifting—compressing image payloads, normalizing bounding boxes, and coordinating multi-key inference asynchronously without managing servers.
  • Amazon S3: Stages high-resolution audit snapshots and inspection frames for fast retrieval.
  • AWS Systems Manager (SSM) Parameter Store & Secrets Manager: Keeps all our vision credentials and administrative tokens encrypted and isolated—guaranteeing zero secrets leak into client bundles.
  • Amazon CloudWatch: Gives us live observability over inference latency, model failover events, and operational health.
AI Tools Used:
To help us build and debug efficiently during this hackathon, we utilized:
  • Google Antigravity IDE & Gemini Code Assist: For rapid Next.js UI iterations, multi-strategy JSON repair algorithms, and automated test generation.
  • Google AI Studio (Gemini Flash Vision Models): For crafting our high-density material detection prompts and vision classification schemas.
Closing Thoughts:
  • Waste is not just garbage—it is valuable material in the wrong place. With TERRA and AWS, we are working to turn every discarded item into actionable data for a cleaner world.
Video Demo:  https://youtu.be/wOaUelNx0kI?si=QOZA\_20e4o6eRX3p  (GitHub Repo Link Included in video)
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