Serverless Discord Bot
CrèmeAI
A Discord bot built like a service.
A Discord assistant on Lambda with DynamoDB response caching, rate limiting, and CloudWatch instrumentation.
- AWSRUNTIME
- LLMENGINE
- CacheLATENCY
Testing how far a small service can degrade before anyone using it notices.
Runtime
Lambda over a long-lived worker.
I chose Lambda with DynamoDB response caching over a long-lived worker because the bot's traffic is bursty and the service should pay for work when a command arrives. The cost is cold-start sensitivity and another boundary to observe.
Controls
Rate limits are product behavior.
I treated rate limiting as part of the product boundary, not only infrastructure protection. It keeps a single busy channel from turning an assistant into an unreliable shared resource; the rejected alternative was to let the model absorb every request and discover the limit through failure.
Failure
The cache miss was the real path.
A cache miss exposed more dependency behavior than the happy path did. CloudWatch instrumentation made the model and Discord boundaries observable enough to handle instead of guess at, and the service could fail in a known direction when a dependency was unavailable.
Next pass
Cut surface area before adding features.
Next time I would cut secondary commands before adding another integration. The small-service shape is the feature: fewer paths make rate limits, cache behavior, and failure handling easier to explain and test.