Data on AWS
Step 2 connects data. A serverless API on AWS serves telemetry and operations in the twin's own metric frame, so any renderer can pin values to the right place.
The deployed API
| Endpoint | Returns |
|---|---|
GET /telemetry | Freezer, cooler, kitchen and dry-storage temperature and humidity, door state, alarms, forklift positions |
GET /operations | KPIs, areas with stock and utilisation, inventory by product family, supply-chain flows, community kitchen batches, trucks |
GET /health | Liveness |
Region us-east-2 (Ohio), deployed with scripts/deploy.sh from template.yaml (AWS SAM) on 2026-10-25. The account's organisation policy blocks Lambda, CloudFormation and API Gateway in us-east-1 and us-west-2, which is why it runs in Ohio. Measured: 1,000 sequential calls all succeeded, 67 ms median and 78 ms 95th-percentile round trip from a US cloud container.
The data is simulated. Values are computed from the clock, so the Lambda needs no database and two callers in the same second see the same numbers. Every payload carries simulated: true. The browser carries a line-for-line port of the simulator, kept in sync by tests, and uses it when the API is unreachable.
Operations layer
A food bank is a warehouse that runs in reverse: donations, USDA commodities and purchases arrive at the docks, volunteers sort rescued food, pallets go into dry racking, the cooler and the freezer, the community kitchen turns some of it into meals, and partner agencies collect the rest. The operations model follows one simulated day of that flow. Annual volumes, agency counts and floor area are published figures; shares, capacities and recipes are estimates flagged est: true in src/telemetry/operations.json. See the operations page and docs/OPERATIONS.md.
The real-floor path (designed, priced)
| On the floor | Device | Into AWS | Replaces |
|---|---|---|---|
| Cold-room and dock temperatures | LoRaWAN probe sensor, every 5 min | IoT Core for LoRaWAN, rule, Lambda, DynamoDB | zones[].temp_c |
| Cold-room and dock doors | LoRaWAN door contact | same | zones[].door_open |
| Forklift area | BLE beacon per truck, BLE-to-MQTT gateway per area | IoT Core MQTT, same rule path | forklifts[].position |
| Inventory, loads | Existing warehouse management system export | Lambda import | /operations |
| Building geometry | Phone or 360° walkthrough when the layout changes | Step 1 again | captures in twin.usda |
The JSON contract stays the same; real values replace the simulator and simulated becomes false. Amazon Timestream for LiveAnalytics is closed to new customers, so readings go to DynamoDB with an S3 archive. Pricing: Cost. Backend reference: docs/BACKEND.md.