Skip to content

Quick Start

Terminal window
pip install "cordless[deploy]"

lambda_function.py

from cordless import Cordless
bot = Cordless()
@bot.command("hello", description="Say hello")
async def hello(ctx):
await ctx.send("Hello!")
handler = bot.handler()
Terminal window
cordless register lambda_function:bot --token YOUR_BOT_TOKEN

cordless.toml

[deploy]
function = "my-bot"
handler = "lambda_function.handler"
region = "eu-west-2"
runtime = "python3.12"
[deploy.env]
DISCORD_PUBLIC_KEY = "your_public_key"
DISCORD_CLIENT_ID = "your_client_id"
Terminal window
cordless deploy

That’s it — cordless creates the Lambda, API Gateway, and IAM role, then prints your bot’s URL. Paste it into your Discord app’s Interactions Endpoint URL.