
Weekend Creative Challenge: Prompt Roulette
Pull the lever and see what you get: Prompt Roulette is a spin-the-wheel creative generator that rolls a random category (haiku, meme caption, plot twist, band name, villain line, weird invention) plus a rarity tier, then prints your result as a vintage carnival ticket stub. Built entirely on AWS's Always-Free tier -- Lambda, Lambda Function URLs, and DynamoDB -- with zero external LLM calls, plus a public gallery for saving and upvoting your favorite pulls.
Vision & what the app does
Prompt Roulette is basically a slot machine for creativity. You pull a lever, a wheel spins on screen, and it lands on one of six categories: haiku, meme caption, plot twist, band name, villain monologue line, or weird invention. Whatever you land on, the app spits out a short generated snippet, plus a rarity roll: Common most of the time (70%), Rare sometimes (25%), and Legendary if you're lucky (5%). Land a Legendary and the result card turns gold and gets a little extra flair, kind of like pulling a rare drop in a game.


I leaned hard into a vintage carnival ticket-booth look for the whole thing. Results show up as paper ticket stubs, with a ticket number, a perforated edge, and a rarity stamp that looks ink-pressed. If you get a result you actually like, you can save it to a public gallery where other people can browse everyone's tickets and upvote the ones they like best.


That was really the whole design goal: something dumb and fun that takes ten seconds, no sign-up wall, no learning curve. Just pull the lever and see what you get.
How I built it
Before I wrote a line of code, I had one rule I wasn't willing to bend: this had to cost exactly $0, not "probably $0." My AWS account had already burned through its 12-month free tier, so I could only use the parts of AWS that are free forever: Lambda, Lambda Function URLs, and DynamoDB. That meant no API Gateway, no S3, no Bedrock, even though using Bedrock to actually generate the text would've been the more obvious (and honestly easier) route.
So instead, everything is hand-rolled. All the text generation happens inside a Lambda function using plain Python: word banks and templates I wrote myself, with a weighted dice roll for rarity. No LLM calls anywhere in the loop. Every haiku and every ridiculous villain monologue line comes out of templates I built and tuned by hand over the weekend.
A bunch of things went wrong along the way, which honestly ended up being most of the learning:
I had an IAM policy with an overly broad iam:PassRole that AWS flagged in the console as a bad pattern. Had to go back and lock it down to one specific role ARN with a condition attached, instead of leaving it wide open.
I assumed DynamoDB's on-demand billing mode would fall under the free tier. It doesn't, only provisioned capacity does. Had to rebuild the table as provisioned at 5/5 RCU/WCU to actually keep my $0 promise instead of just hoping it'd stay cheap.
I ran into a nasty CORS bug where my Lambda code was setting Access-Control-Allow-Origin manually on top of the Function URL's own CORS config, which created a duplicate header that browsers quietly rejected. curl tests looked totally fine the whole time. It only showed up once I actually opened the site in a real browser.
I built out full Google sign-in with Firebase, including manually verifying JWT tokens in the Lambda (skipping the heavy Firebase admin SDK to stay under the zip size limit), plus a guard so people couldn't upvote the same entry twice. After living with it for a bit, I decided it wasn't worth the friction for something meant to be quick and silly, so I ripped it back out, and made sure to actually purge the Firebase credentials from git history rather than just deleting the file in a newer commit, since that alone wouldn't have scrubbed it from history at all.
When I went to add reserved concurrency as a safety cap on the Lambdas, I found out my account's total concurrency limit is only 10, way under the usual default. Turns out that was already a tighter cap than anything I could've set myself, so I just left it as is.
AWS services used / architecture overview
AWS Lambda: two separate functions. One (prompt-roulette-generate) just does the creative generation, no state involved. The other (prompt-roulette-gallery) handles saving, listing, and upvoting gallery entries in DynamoDB.
Lambda Function URLs: used instead of API Gateway. Partly to dodge API Gateway's cost and complexity, partly because its free tier only lasts 12 months and mine had already run out. CORS is locked down at the Function URL level to only allow my GitHub Pages domain.
Amazon DynamoDB: one table, PromptRouletteEntries, provisioned at 5/5 RCU/WCU, storing every saved ticket and its vote count.
Frontend: plain HTML/CSS/JS on GitHub Pages, calling the two Lambda URLs directly. GitHub handles hosting the frontend for free, so the only AWS cost surface is the backend.

What I learned
The biggest thing I took away wasn't really technical. It was how easy it is to believe something works just because a test passed or a curl request came back clean, when it hasn't actually been checked the way it matters. My CORS bug never showed up in curl, only in an actual browser. A test suite I thought was solid turned out to only be checking the rejection path, not the part that actually mattered. I got a lot more careful about asking whether I'd really verified something, or just gotten a result that looked fine.
On the AWS side, I walked away with a much clearer sense of where the free tier actually starts and stops. The DynamoDB on-demand thing genuinely surprised me. I also came away with a better mental model for what Lambda Function URL CORS is actually protecting: browser-side reading of responses, not whether the endpoint itself is reachable. That distinction hadn't really clicked for me before this weekend.
Link to app or repo
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article