A serverless design on AWS, sized for pilots.
Wastora's architecture uses Amazon API Gateway and AWS Lambda to receive WhatsApp messages, Amazon S3 for batch photos, Amazon DynamoDB for batch records, Amazon Bedrock to read photos, and AWS IoT Core for sensor readings.
Deployed and tested
None yet. Wastora is in development and no part of this architecture is running for customers.
Configured, not yet tested
None yet.
Proposed
Every service on this page. This is the design we plan to build for the Lagos pilots, and it may change as we build.
Four lanes, one shared record.
Batches come in over WhatsApp, are forecast on a schedule and whenever readings change, trigger alerts and offers, and are viewed in a web dashboard. Every lane reads and writes the same batch record.
What each service would do.
| Service | Role in Wastora | Status |
|---|---|---|
| Amazon API Gateway | Receives incoming WhatsApp messages (webhook) and serves the dashboard API. | Proposed |
| AWS Lambda | Runs batch intake, the forecast engine, alerts and rescue offers, and the dashboard API. | Proposed |
| Amazon S3 | Stores batch photos, encrypted, with lifecycle rules to delete them after a set period. Also hosts the dashboard files. | Proposed |
| Amazon DynamoDB | Stores sites, batches, sensor readings, forecasts, offers and audit events. | Proposed |
| Amazon Bedrock | Gives access to a vision-capable foundation model that reads batch photos and writes plain-language explanations from calculated values. | Proposed |
| AWS IoT Core | Receives temperature readings from cold-room and chiller sensors. | Proposed |
| Amazon SQS | Queues forecast jobs and outgoing WhatsApp messages so spikes don't drop work. | Proposed |
| Amazon EventBridge Scheduler | Re-runs forecasts hourly and sends daily logging reminders. | Proposed |
| Amazon Cognito | Dashboard sign-in and roles (owner, manager, staff) for pilot sites. | Proposed |
| Amazon CloudFront | Delivers the dashboard over HTTPS. | Proposed |
| AWS KMS | Manages the keys used to encrypt photos and records. | Proposed |
| AWS CloudTrail and Amazon CloudWatch | Audit logs of account activity, and application logs, metrics and alarms. | Proposed |
| WhatsApp Business Platform | Not an AWS service. Meta's platform for sending and receiving the WhatsApp messages; Wastora connects to it through API Gateway. | Proposed |
Rules do the maths. The model reads the photo.
The days-left estimate is calculated, not generated. That keeps it explainable and stops the model from inventing inputs.
- Check inputs. Produce type, arrival date and either a sensor temperature or a storage type. If the date or temperature input is missing, stop: the estimate is unavailable, with the reason.
- Base shelf life. Each produce type has a rule for expected life at a given temperature, including chilling damage for produce like tomatoes kept too cold.
- Photo reading. A vision model on Amazon Bedrock rates ripeness and visible damage from the batch photo. That rating adjusts the base estimate.
- Rank and explain. Days left sets the status: sell today, sell this week or safe. The model then writes a short explanation using only the calculated values.
- Correct over time. During pilots, actual outcomes per site are compared with forecasts to tune the rules.
Choices behind the design
- Serverless and pay-per-use. Pilot volumes are small and spiky (deliveries arrive in the morning), so nothing runs idle.
- WhatsApp first. Staff already use it; there is no app to install or update.
- Model access inside AWS. Amazon Bedrock keeps photo reading within our AWS account. AWS states that Bedrock does not use customer prompts or outputs to train models.
- Region chosen for Lagos. The AWS Region will be chosen for latency to Lagos and for availability of the services above.
- Queues between steps. SQS keeps photos and alerts from being lost if a step slows down.
What gets stored.
Site
Name, type (cold room, depot, supermarket), sensors, people who get alerts.
Batch
Produce, quantity, unit, source, arrival date, photo reference, storage type or sensor.
Reading
Sensor ID, temperature, time.
Forecast
Days left, status, reasons, confidence, inputs used, time calculated.
Offer
Batch, approved discount, approver, buyers sent to, acceptance (roadmap).
Audit event
Who did what and when: logs, edits, approvals, deletions.
Talk to us about a pilot
If you run a cold room, depot or fresh section in Lagos, we would like to hear how you track stock today.