AWS Builder Center
Building a Serverless Satellite Crop Advisory Pipeline on AWS | WeMakeDevs First Commit Hackathon

Building a Serverless Satellite Crop Advisory Pipeline on AWS | WeMakeDevs First Commit Hackathon

I built this project to solve the devastating cycle of crop overproduction and market price crashes. Using satellite imagery and machine learning, my pipeline analyzes real-time farm polygons and classifies exactly what crops are actively growing on the ground. All this "ground truth" data is then securely stored in a centralized, serverless AWS backend using Amazon S3 and Athena. By visualizing everything on a live interactive map.

Farmers often lose a massive amount of money simply because everyone plants the exact same crop that was profitable last year, which creates a massive regional oversupply and completely crashes the market. To solve this, I built a pipeline that brings satellite intelligence to everyday agriculture. It extracts actual farm boundaries, classifies what is currently growing, and centralizes that "ground truth" data so farmers can actually see regional crop saturation in real time.
Here is exactly how I built the pipeline and utilized AWS to handle the heavy lifting:
  • Machine Learning Classification: The system extracts farm polygons from satellite imagery and runs them through a custom ML model to classify the active crops. I ended up hosting the model on Hugging Face to bypass AWS Lambda's 250MB limit, keeping the inference fast and lightweight.
  • Amazon S3 (The Data Lake): All of the heavy spatial CSV files containing the classified polygon data are stored directly in an S3 bucket. This acts as a highly durable, low-cost data lake completely separated from the frontend.
  • Amazon Athena: Instead of setting up and maintaining an expensive spatial database like PostGIS, I used Athena. It lets me run serverless SQL queries directly on the raw CSVs in S3 to pull specific owner_name and polygon_id data on demand.
  • AWS API Gateway & IAM: I exposed the Athena queries as secure REST endpoints using API Gateway. Because runaway serverless queries can get expensive, I configured a strict 1 request per second rate limit. I also used IAM to apply strict permission policies so the Gateway only has the exact access it needs to read the S3 data.
The Interactive Frontend: A React and Mapbox frontend connects to this AWS backend (routed through a lightweight Go proxy to hide API keys). It parses the raw spatial coordinates into GeoJSON, rendering a live, interactive map.
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