Devtools Month with AWS Blocks (Level 1): Building Without the Fear of a Surprise Bill -BookmarkBox on AWS Blocks
A behind-the-scenes look at how I built a private bookmark manager for the AWS User Group Madurai Builders Skill Sprint using AWS Blocks... and why the framework finally solved a worry that follows me into every cloud project.
Why I Built BookmarkBox :
Every time I start a new AWS project, one thought shows up before the first line of code does.
What if this ends up costing me money I didn't plan for?
It's a strange kind of anxiety for a student builder. You want to experiment, break things, leave a Lambda function running a little longer than you should, spin up a database just to see how it behaves.. but there's always this quiet voice reminding you to check the billing dashboard before you go to sleep. I've set budget alarms. I've written IAM lockdown policies. I've capped outputs so a runaway loop couldn't turn into a runaway invoice. All of that works, but it's also overhead...a tax I pay just to feel safe enough to build.
So when the AWS User Group Madurai announced the Builders Skill Sprint, and Level 1 turned out to be built on something called AWS Blocks, I didn't know yet that it was about to remove that overhead entirely.
The challenge itself was simple to state: build a private bookmark manager. People sign up, sign in, save links, see only their own bookmarks, and none of it disappears when the server restarts.
What made it worth writing about wasn't the bookmark manager. It was what building it taught me about a framework that lets you develop a real, production-shaped AWS application, entirely on your laptop, with zero AWS account required until the moment you actually choose to deploy.
The Problem :
Here's the thing about learning cloud by building projects: the learning and the risk are bundled together.
You want DynamoDB experience, so you provision a table. You want to test Cognito, so you configure a user pool. You want to try Bedrock, so you make a few calls. Each of these is a small, reasonable thing... but stack five of them together across a weekend project, forget to tear one down, and you've got a bill waiting for you that has nothing to do with how much you learned.
I didn't want to choose between building freely and building safely. I wanted both.
Design Goals and Architecture Decisions :
Before I asked Kiro to write a single line, I sat with a few questions, the same way I do before any project:
- How do I get real DynamoDB-shaped, Cognito-shaped experience without an AWS bill sitting behind it?
- How do I make sure a signed-in user's data is actually private, not just hidden by the UI?
- How do I avoid the classic mistake of trusting whatever the browser tells the server?
- How do I build something that could genuinely move to production later, instead of a throwaway local prototype?
AWS Blocks answered the first question in a way I didn't expect. It isn't a simulator that pretends to be AWS. When you write
new AuthBasic(scope, 'auth') or new DistributedTable(scope, 'bookmarks', {...}) , that same line of code runs locally against a JWT-based mock and a disk-backed store under .bb-data/ during development...and becomes real Amazon Cognito or Amazon DynamoDB the moment you deploy. No rewrite. No "well it worked locally but breaks in prod." The code you test at midnight on your own machine is the code that would run on AWS.For the first time, I could build something that felt architecturally honest without opening my AWS console once.
What I Built :
BookmarkBox is a private bookmark manager. Underneath the simple feature list...sign up, save a link, see your list, delete or edit it... the real challenge was everything the spec didn't spell out in code:
- A signed-out visitor should not be able to touch anyone's data, not even by accident.
- A signed-in user should only ever see their own bookmarks... not because the UI hides other people's, but because the backend structurally cannot return them.
- Data has to survive a page refresh and a full server restart.
- Two users, signed in from two different browser windows, should never be able to see or delete each other's records.
That last point ended up shaping the entire data model.
The Privacy Model: Enforced by Structure, Not by If-Statements :
The obvious, lazy way to check ownership is: fetch the bookmark, check if
bookmark.userId === currentUser.id , then allow or deny. It works, but it's a check you can forget to write, and a check that still requires trusting that the wrong data made it into memory in the first place.I wanted something stronger....a design where the wrong data can't even be fetched.
That's what
DistributedTable 's partition and sort keys gave me. Every bookmark is stored under userId as the partition key and bookmarkId as the sort key. listBookmarks() doesn't scan the whole table and filter..... it queries only the authenticated user's partition. There is no code path where User B's query can even reach User A's rows.Delete works the same way.
deleteBookmark(bookmarkId) doesn't just check the ID...it deletes using the composite key { userId, bookmarkId } , built entirely from the server-derived userId , never from anything the frontend sends. If User B tries to delete a bookmark ID belonging to User A, the backend builds a key that simply doesn't exist in User B's partition. Nothing happens. Not because of a permission check that says "no", because there was never a matching row to delete in the first place.Every single bookmark method, create, list, delete....opens with the same line:
const user = await auth.requireAuth(context);If that line throws, nothing after it runs. The frontend never gets a chance to pass a
userId along, because the method signature never asks for one.
Architecture :

The Snag I Hit :
Not everything passed on the first try. When I ran my own compliance audit against the challenge checklist, one thing came back only partially true: I had a working sign-in flow, but the
Authenticator component itself was tucked inside a menu, behind a button click, rather than being visibly rendered when a visitor first landed signed-out.It's a small thing, but the challenge spec had a line that stuck with me: hiding a button is not authorization. Even though my backend was already secure...
requireAuth was doing its job regardless of what the UI showed*..* I realized the same principle applies to good UX honesty. A signed-out visitor should immediately see that they need to sign in, not go looking for it. I moved the Authenticator so it renders directly on the page for anyone who isn't signed in yet, instead of waiting behind a click.Small fix. Good reminder that "the backend is secure" and "the app is honest about its state" are two different bars, and both matter.
What's Next :
BookmarkBox does what Level 1 asked for, plus a bit more.... tag and date indexes, client-side filtering, authenticated JSON export, and edit support that reuses the same ownership-safe composite key as delete.
But the bigger takeaway for me wasn't the bookmark manager. It was realizing that the anxiety I've carried into every AWS project....*what is this going to cost me to learn....*doesn't have to be part of the deal anymore. AWS Blocks let me build something that behaves like a real, production-shaped application, entirely for free, and only asks me to think about AWS billing on the day I actually decide I'm ready to deploy.
That's the kind of tool that changes how freely you're willing to experiment. And for a student builder, that freedom is worth writing about.
Code: ** Github repo link . Built for the AWS User Group Madurai Builders Skill Sprint, Level 1 - Personal Bookmark Manager.

Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article