What it does Flu Watch ingests WHO FluNet surveillance data on a schedule, scores the current week against a multi-year CockroachDB baseline, and flags anomalies. Bedrock turns each flagged anomaly into a plain-English explanation. Nothing becomes an active alert until a human — the Officer of the Day — reviews and approves it, and that decision is written back to CockroachDB with who approved it and when.

How we built it AWS Lambda pulls the FluNet feed and writes it into CockroachDB's season_baseline table. A second Lambda, fronted by an API Gateway HTTP API, serves the live API layer. CockroachDB's Managed MCP Server lets our anomaly-detection logic query that season store directly, and a Distributed Vector Index (1024-dim, AWS Bedrock Titan V2 embeddings) supports similarity search across historical seasons. Anomaly scores feed Bedrock, which drafts the explanation shown to the reviewer. Approved decisions land in anomaly_results as a permanent audit trail.

Challenges we ran into Rebuilding the vector index at the correct dimensionality after an embedding-model mismatch, working through several rounds of AWS IAM permissions for Lambda and API Gateway, discovering that Lambda Function URLs were blocked by an account-level SCP and pivoting to API Gateway instead, and keeping the human-approval step genuinely blocking rather than cosmetic.

What we learned Infrastructure assumptions break silently — the vector dimension mismatch and the SCP-blocked Function URL both looked like configuration bugs at first, but were actually deeper platform constraints that needed a different approach entirely, not just a fix. We also learned that IAM permissions are best granted incrementally as real errors surface, rather than guessed upfront — every "least privilege" denial told us exactly what was missing. And the human-approval step taught us the most: it's easy to build a UI that looks like it blocks automation, and much harder to make sure it actually does. Verifying that a decision genuinely can't be skipped mattered more than any single feature.

What's next Expand beyond a single test region, add historical back-testing against more FluNet seasons, and surface the approval queue as a proper on-call rotation tool.

Built With

  • aws-bedrock
  • aws-lambda
  • cockroachdb
  • cockroachdb-distributed-vector-indexing
  • cockroachdb-managed-mcp-server
  • cockroachdb-serverless
  • flunet
  • python
  • who
Share this project:

Updates

Submission history