Introduction
Discord bots have traditionally required a server running 24/7 to respond to commands and events. That’s no longer the case.
In 2020, Discord introduced slash commands and a couple years later the interactions endpoint, a webhook-based approach that eliminated the need for constantly running processes. Instead of maintaining a bot that listens for messages with prefix commands like !ban or !kick, you can now build bots that respond to native Discord interactions through simple HTTP requests.
Slash commands are first-class citizens in Discord’s ecosystem. They’re easily viewable in-app, provide built-in descriptions and autocomplete, and integrate directly with Discord’s UI. When a user types /, they see your bot’s commands alongside Discord’s native features.

Discord’s interactions have evolved significantly since their initial release. They now support modals, file uploads, autocomplete, and more. All without requiring an always-online server. If you need to process gateway events (like message reactions or voice state changes), you’ll still need a persistent connection, but those can be handled separately from your interaction logic.
The interactions endpoint is what makes serverless possible. You configure it in the Discord Developer Dashboard, pointing Discord to a URL that receives interaction webhooks:

This lets us leverage AWS Lambda and, if needed, pay only when commands are actually used. For small to medium servers, this means staying comfortably within AWS’s Always Free Tier and serving hundreds of thousands of interactions per month at no cost.
Note (Cost Reality)
AWS Lambda’s free tier includes 1M requests/month, and DynamoDB’s includes 25 GB storage. For most Discord bots, you’ll never exceed these limits.
This guide walks through building a serverless Discord bot with daily rewards, gambling mechanics, and persistent balance tracking while remaining entirely within AWS’s free tier.
What We’ll Build
We’ll create a simple virtual currency bot with three core features:
- Daily rewards - Users claim money once per day
- Gambling - Risk currency for a chance to 3x their bet
- Balance - Persistent user balances stored in DynamoDB, unique to each user, guild combination
This isn’t meant to be a production-ready economy bot—it’s a practical example that demonstrates serverless Discord bot architecture, database integration, and interaction handling. The goal is to understand how these pieces fit together, not to build the next big thing.
What We’ll Be Using
- Dressed to handle the interactions and events
- SST to deploy to AWS and manage the resources on AWS
- AWS Lambda
- AWS DynamoDB
Before We Begin
Important
Requirements
In terms of software, I’ll be using Node as my runtime and have the AWS CLI installed.
Expected Experience
While I’m going to do my best to simplify the process, I’m going to assume you, the reader, have at least a basic understanding of JavaScript/TypeScript, Node/NPM, and the general NodeJS ecosystem. As well as git and understanding .gitignore.
I will also link to other documentation when it’s helpful as well.
I’ve broken down this guide into parts, each one building on the last. We’ll start with the basics and work our way up to a fully functional bot.