Skip to content

Move from AWS Scheduled Lambda to Always-On Kubernetes BotΒ #25

@damienjburks

Description

@damienjburks

✨ Overview

This issue tracks the migration of the-herald from an AWS-based, scheduled Lambda setup to an always-on bot hosted on-prem in Kubernetes.

The goal is to support dynamic, ad-hoc event reminders in Discord β€” something that cannot be done reliably or cost-effectively using AWS Lambdas due to the need for persistent background scheduling.


🎯 Goals

  • Migrate all event reminder functionality to a containerized service that runs persistently in the homelab.
  • Replace AWS Lambda + EventBridge schedules with in-memory and/or persistent background jobs.
  • Enable the-herald to dynamically accept new events (via config or future Discord commands) and post reminders automatically to Discord channels.

🚚 Migration Scope

Component AWS (Current) K8s (Target)
Scheduler EventBridge APScheduler / discord.ext.tasks
Event Trigger Lambda Always-on container with async loop
Hosting AWS Lambda K8s in homelab
Event Storage (optional) N/A (static schedule) SQLite (initial), upgradeable to RDS-lite
Message Delivery Discord Webhook or Bot Token Same, but now handled from persistent bot

🧱 Technical Tasks

  • Create Dockerfile for the-herald bot
  • Add APScheduler to manage background jobs for reminders
  • Persist scheduled events using SQLite
  • Mount persistent volume in K8s to retain database across restarts
  • Implement /add_event logic (manual or via CLI/config)
  • Configure Discord bot token + target channel ID via secret or env
  • Deploy the-herald in K8s using helm or kustomize
  • Add liveness/readiness probes for bot health in K8s
  • Decommission related AWS resources (Lambda, EventBridge rules)

πŸ’¬ Future Enhancements (Post-Migration)

  • Add slash command support to define new events in Discord
  • Add /events listing command
  • Add support for editing/canceling events
  • Weekly digest of upcoming events
  • Tag specific roles in reminders (e.g., @Event Squad)

πŸ“ Notes

This migration will allow the-herald to support a richer, more interactive experience for the DSB community. Running the bot as an always-on container in the homelab (within Kubernetes) also unlocks the ability to later centralize other services and bots under one infrastructure.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions