
Aurora Backtrack Doesn't Care Whose Fault It Was
I built a shared trading demo where anyone can trigger a real Amazon Aurora Backtrack — and it rewinds the whole database, not just the one person's mistake.
A few weeks ago I built DROPZERO, a limited-drop storefront on Amazon Aurora DSQL that never oversells no matter how many people slam the buy button at once. It got picked up in a previous Builder Center roundup, which was a nice surprise. So when the next Database-themed roundup came around, I wanted to do something in the same spirit but from a completely different angle: instead of a feature that prevents chaos, what happens if I build something around a feature that causes it on purpose?
That's how I landed on Aurora Backtrack.
What Backtrack actually does
Backtrack lets you rewind an Aurora MySQL-Compatible cluster to a point in time, without restoring from a snapshot. It sounds like a fancy undo button, and it is one, but the part that got my attention is the scope: you can't backtrack a single row, or a single table, or a single tenant. You backtrack the whole cluster. Every table, every row, every schema change, all the way back together. There's no "just my mistake" option.
Most of the time that's a limitation you work around. I wanted to build something where it's the entire point.

Everyone's market, one undo button
The idea: a shared trading toy called UNDO ALL. One fake asset, FLUX, wanders up and down in a random walk. Anyone visiting the page can go long or short with play money — no real currency anywhere in this thing. And anyone can hit a button labeled "Rewind everyone."

Press that button and a real
BacktrackDBCluster call goes out to AWS. A couple minutes later, the entire cluster — not just your bets, everyone's — snaps back to an earlier point. Your winning streak disappears along with the other guy's. Nobody agreed to this except the one person who clicked.
I put a confirmation dialog in front of the button on purpose, because the honesty of what it's about to do felt important to say out loud.
The stack, briefly
[FLOW DIAGRAM HERE: flow-diagram.jpg — overall flow from bet to backtrack to reset]
It's a Next.js app on Vercel talking to an Aurora Serverless v2 MySQL cluster through the RDS Data API, so there's no VPC networking to babysit from a serverless function. Authentication is keyless — Vercel's OIDC federation assumes an IAM role, same pattern I used for a couple of earlier projects. The one new wrinkle: the cooldown that stops people from spamming the rewind button can't live inside Aurora. If it did, backtracking the cluster would also backtrack the cooldown, which means the button un-cools-down itself the moment you use it. So that one small piece of state lives in DynamoDB instead, safely outside the blast radius.

Where the fun bugs were
I assumed detecting "the backtrack is done" would be the easy part: poll
DescribeDBClusters , wait for the status to say available again, done. It took three attempts to get right, and each wrong attempt taught me something true about how Backtrack behaves that I wouldn't have guessed from the docs.First attempt: as soon as the status stopped saying
backtracking , I called it finished. Wrong — right after you call BacktrackDBCluster , the cluster can sit at available for a few seconds before AWS actually starts the operation. My app declared victory before anything had happened.Second attempt: require the status to visibly pass through
backtracking before trusting available again. Also wrong, in the opposite direction — once, the backtracking window was shorter than my poll interval and I never saw it. The app got stuck waiting for a signal that had already come and gone.Third attempt, the one that's live now: don't trust the control plane message alone. After the status looks done, keep re-fetching the actual data and compare it against a snapshot taken right before the rewind. Only call it finished once the position count has genuinely dropped. Somewhere along the way I also learned that "available" from
DescribeDBClusters and "the data you get back is actually post-rewind" are not the same instant — there's a real lag between the control plane saying the cluster is back and the data plane fully catching up, sometimes several seconds. Nobody warns you about that gap.
What it actually feels like
Once the timing was right, testing this thing got genuinely uncomfortable in a way I didn't expect from my own toy demo. I'd place a bet, watch the leaderboard update, then hit rewind myself just to check the logic — and every time, watching someone else's balance (a fake anon session, but still) vanish along with mine landed differently than deleting my own row ever does.

That reaction is really just Backtrack working exactly as designed. It was never built to be surgical, and pretending otherwise in the UI would have been the actual bug. Aurora did precisely what it says on the tin the whole time; the app just had to catch up to how honest that behavior is.
The nine-language switcher and the RTL layout for Arabic were the easy part, for what it's worth. Getting a distributed system's own state machine to admit the truth about itself took a lot longer than translating "rewind everyone" into German.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article