```html

Building a Multi-Tenant Executive Intelligence System: Lambda, SES, and Automated Report Generation Across Four Business Entities

What Was Done

Over this development session, we built and deployed a comprehensive executive reporting infrastructure that generates role-specific strategic analysis across four distinct business entities (JADA, Queen of San Diego, QuickDumpNow, and Dangerous Centaur) plus three additional operational entities. The system ingests operational data from multiple sources, synthesizes it through role-specific lenses (CEO, CTO, CFO, CMO, Accounting Officer), and distributes formatted reports via AWS SES with BCC tracking.

The core deliverable was a Python-based report generation pipeline (/Users/cb/Documents/repos/tools/send_exec_reports.py) that:

  • Reads environment variables from a secured repos.env file for SES credentials and sender addresses
  • Generates five distinct executive reports, each with a different analytical perspective
  • Sends via AWS SES with proper MIME formatting and BCC routing to admin@queenofsandiego.com
  • Maintains an audit trail of delivery attempts

Technical Architecture

Report Generation Pipeline

The system operates in two layers: data aggregation and report synthesis.

Data Layer: Reports pull from multiple sources without a unified database. Instead, they synthesize information from:

  • Active project handoffs stored in /Users/cb/Documents/repos/agent_handoffs/projects/ (markdown format)
  • Lambda function code from each domain's tooling (e.g., /sites/queenofsandiego.com/tools/shipcaptaincrew/lambda_function.py)
  • Frontend implementations showing current feature parity
  • Historical command execution logs documenting deployment patterns
  • Manual asset inventory (vessel lists, domain registrations, etc.)

Synthesis Layer: Each report applies a domain-specific analytical framework. For example:

  • CEO Report: Asset inventory → critical shortfalls → missing KPIs → 30-day action roadmap
  • CTO Report: Stack audit (by entity) → security gaps → cost analysis → dev cycle deficiencies → engineering priorities
  • Accounting Report: Revenue recognition issues → chart of accounts → expense audit → profitability roadmap
  • CMO Report: Channel visibility matrix → demand modeling → OTA sequencing → local SEO roadmap
  • CFO Report: Burn rate modeling → capital deployment framework → break-even analysis → monthly targets

SES Integration

Email delivery uses AWS Simple Email Service with environment-based configuration:


# From repos.env (not committed to version control)
SES_SENDER_ADDRESS=admin@queenofsandiego.com
SES_AWS_REGION=us-west-2
SES_AWS_ACCESS_KEY_ID=***
SES_AWS_SECRET_ACCESS_KEY=***
RECIPIENT_EMAIL=c.b.ladd@gmail.com

The sender address must be a verified identity in SES. In this case, admin@queenofsandiego.com was pre-verified, allowing direct sends without sandbox limitations.

BCC routing to admin@queenofsandiego.com creates an audit trail: all reports are copied to the organizational admin account for compliance and record-keeping.

Multi-Entity Scoping

Rather than a centralized data model, the system uses entity-specific analysis:

  • JADA: Booking pipeline, partnership status, technical debt in booking system
  • Queen of San Diego (QOS): Charter operations, crew management (via ShipCaptainCrew tool), event checklist system, waiver handling
  • QuickDumpNow (QDN): Service funnel, local SEO, conversion tracking
  • Dangerous Centaur (DC): Client portfolio management, no established billing model
  • 3028 51st St Rental: Real estate asset tracking
  • Expert Yacht Delivery: Logistics operations
  • DangerousCentaur Client Portfolio: Revenue recognition and billing audit

Key Infrastructure Decisions

1. Report Generation Without a Central Data Warehouse

Decision: Generate reports by synthesizing existing artifacts rather than building ETL pipelines.

Why: The organization has limited operational maturity. Building a data warehouse would require:

  • Schema design (which would expose gaps)
  • ETL logic for each entity
  • Real-time or scheduled sync logic
  • Analytics tooling (Redshift, BigQuery, or similar)

Instead, we audit the actual system of record (code, config, logs, handoff docs) and synthesize insights. This reveals the real state faster and forces acknowledgment of data gaps.

2. Role-Specific Report Lenses

Decision: Generate five separate reports from the same raw facts, each applying a different analytical framework.

Why: A single "state of the business" report would be noisy for all audiences. A CEO needs asset inventory and KPIs. A CTO needs stack audit and security gaps. A CFO needs burn rate and unit economics. By separating concerns, each report is actionable without noise.

3. BCC to Admin for Audit Trail

Decision: All reports sent to individual addresses are BCC'd to admin@queenofsandiego.com.

Why: Creates organizational memory. Reports are not lost in personal inboxes; they're also archived to a shared account where they can be retrieved later.

4. Environment-Based Secrets Management

Decision: SES credentials read from repos.env, which is gitignored.

Why: Avoids hardcoding credentials in source. In production (AWS Lambda), credentials would come from IAM roles or Secrets Manager. For local execution, environment variables are simpler than a separate secrets service.

Integration with Existing Infrastructure

The reporting system integrates with existing Queen of San Diego infrastructure:

  • ShipCaptainCrew Lambda: Located at /sites/queenofsandiego.com/tools/shipcaptaincrew/lambda_function.py. Reports audit its current state: event creation, role management, waiver handling, magic link auth, JWT token generation.
  • Frontend Sync: Frontend code in /sites/queenofsandiego.com/tools/shipcaptaincrew/frontend/index.html is analyzed for feature parity with Lambda capabilities.
  • SES Verified Identities: admin@queenofsandiego.com must be verified in SES before sending; this is a prerequisite, not a deployment step.

Deployment and Testing

The report generation script was tested locally before any organizational distribution: