
Weekend Challenge: Turn One Annoying Task Into an App: StudyKit — Lecture Notes to Flashcards in 10 Seconds
An AI-powered serverless web app that turns raw lecture notes into a summary, key terms, flashcards, and a self-marking quiz using Amazon Bedrock, AWS Lambda, and Amazon S3.
Vision and what the app does
I take a lot of courses. Between university semesters and Coursera tracks, my Desktop has
folders for operating systems, computer networks, software engineering, IT support and
security — each one stuffed with notes I typed while a lecture was playing.
The lecture is the easy part. The annoying part is what comes after.
Raw notes are not revision material. To actually study from them I have to reread the
whole file, pull out the terms that matter, write flashcards, and invent practice
questions to test myself with. That's another 30 to 40 minutes per topic, it's pure
mechanical copy-pasting, and because it's boring I usually skip it — which means the
notes just sit there and I revise badly the night before an exam.
StudyKit removes that step. You paste a wall of notes (or drag in a
.txt / .md
file), press one button, and about ten seconds later you get back:- a summary of the core ideas in a handful of bullets,
- a key terms list with one-line definitions,
- a deck of flashcards you click to flip,
- and a multiple-choice quiz that marks itself and explains each answer.
There's also a "Download as Markdown" button so the whole kit drops straight back into my
notes folder.
The design rule I set myself was that it must work on messy input. My notes are full of
half-sentences, arrows and abbreviations. So the prompt explicitly tells the model the
notes may be messy or incomplete, and to build only from what's actually there rather
than inventing plausible-sounding facts — which matters a lot when the output is the
thing you're going to revise from.
How it works, from the user's side
- Open the app. There's one big text box and one button.
- Paste your notes in, or drag a
.txt/.mdfile straight onto the box. A live character count tells you how much you've given it.
- Press Build my study kit. It takes about ten seconds.
- The results appear as four tabs — Summary, Key terms, Flashcards, Quiz.
- Click any flashcard to flip it. Answer a quiz question and it immediately marks itself green or red, reveals the correct option, and explains why.
- Hit Download as Markdown and the whole kit saves to your notes folder.
That's the entire loop: messy notes in one end, revision material out the other, no
copy-pasting in between.
Before — a lecture's worth of raw notes pasted in:

After — key terms pulled straight out of those notes:

Flashcards, click to flip:

And a quiz that marks itself and explains the answer:

That's the whole loop, running on the deployed S3 site — one paste, ten seconds, four kinds
of revision material.
How I Built It
I gave myself one design constraint: the smallest number of moving parts that still
counts as a real deployed app. It's a weekend, and every extra service is another thing
that can be misconfigured at 11 pm.
That constraint drove every decision:
One Lambda, no API Gateway. My first instinct was the standard API Gateway → Lambda
setup, but a Lambda Function URL gives you an HTTPS endpoint with built-in CORS
configuration and nothing else to wire up. For a single POST endpoint, API Gateway was
pure overhead.
No dependencies, no build step. The function is one Python file using
boto3 , which
ships with the Lambda runtime — so I can paste it straight into the console editor. No
zip uploads, no layers, no pip install -t . . The frontend is a single self-contained
index.html with inline CSS and JS: no npm, no bundler, upload one file to S3 and it's
live.Bedrock's Converse API rather than raw
invoke_model , because it gives one uniform
request shape and a clean system prompt slot, so switching models later is a one-line
change.Challenges, and what fixed them
The model didn't always return clean JSON. Even with "output raw JSON only" in the
system prompt, I'd occasionally get it wrapped in
```json fences or prefaced
with "Here's your study kit:". A strict json.loads() blew up on those. I wrote an
_extract_json() helper that strips code fences and, failing that, grabs the outermost
{...} block. I also dropped temperature to 0.2 , which made the format much more
consistent.A malformed quiz question broke the whole page. One run returned a question with
three options instead of four, and my rendering loop crashed on the missing index. Rather
than trusting the model, I added a
_normalize() pass that throws away any quiz item
that doesn't have exactly four options and a valid answer_index between 0 and 3. Fewer
questions is a fine outcome; a blank page isn't.Task timed out after 3.00 seconds . Classic first-Lambda mistake. The default 3s
timeout isn't close to enough for a generation call — I raised it to 2 minutes and bumped
memory to 512 MB."Failed to fetch" — the bug that cost me the most time. This was the nastiest one,
because the backend was fine. I could hit the Function URL with
curl and get a
perfect 200 with a full study kit. But the moment the deployed website called the exact
same endpoint, the browser threw Failed to fetch and nothing else. No status code, no
detail, no CloudWatch entry — because the request never reached my function.The cause: I had configured CORS on the Lambda Function URL and set the
Access-Control-* headers in my Python response. So every response carried
Access-Control-Allow-Origin twice. The CORS spec permits exactly one value, so the
browser rejected the response before my JavaScript ever saw it.What made it hard to spot is that
curl doesn't send an Origin header by default, so
AWS never injected its copy and my tests only ever showed one header. The moment I
re-ran it with -H "Origin: ..." , the duplicate appeared immediately:access-control-allow-origin: *access-control-allow-origin: *The fix was deleting three lines from my Lambda and letting the platform own CORS
entirely. Related surprise from the same setup: the Function URL's Allow methods
dropdown has no
OPTIONS option, which threw me until I realised Function URLs answer
the preflight themselves — that's precisely why my code shouldn't have been touching
CORS in the first place.Answered quiz options faded out. A small one, but it mattered. I had a global
button:disabled { opacity: 0.45 } rule, and my quiz disables all four options once you
pick one. So the instant you answered, every option — including the correct one — dropped
to 45% opacity, exactly when you most need to read them. Fixed by overriding the fade on
quiz options and de-emphasising the unpicked ones with colour rather than transparency.AccessDeniedException on the first real call — and every tutorial gave me the wrong
fix. Guide after guide said to go to Bedrock → Model access and enable Nova Lite.
When I got there, the page had been retired: serverless foundation models are now enabled
automatically the first time your account invokes them, so there was nothing to click.The actual cause was IAM. The Lambda console creates an execution role that can write
CloudWatch logs and nothing else, so I had to attach an inline policy allowing
bedrock:InvokeModel . With the model-access gate gone, IAM is now the only thing
between your function and Bedrock — which means AccessDeniedException has exactly one
likely cause instead of two.I tested the parsing and validation logic locally with
boto3 stubbed out — fenced JSON,
JSON buried in prose, malformed quiz items, too-short input — before deploying anything.
Catching those on my laptop instead of in CloudWatch saved a lot of time.AWS Services Used / Architecture Overview

Service | Role |
|---|---|
AWS Lambda | Runs the backend and hosts the HTTPS endpoint via a Function URL |
Amazon Bedrock (Amazon Nova Lite) | Turns notes into structured study material |
Amazon S3 | Static website hosting for the frontend |
Amazon CloudWatch Logs | Where I debugged every one of the errors above |
AWS IAM | Execution role + a scoped inline policy for bedrock:InvokeModel |
The backend, deployed and running in the Lambda console — the whole thing is one file with
no build step, which is exactly why I could fix bugs by editing here and hitting Deploy:

How it's triggered: the Lambda Function URL. The browser POSTs the notes as JSON
directly to it — there's no queue, no scheduler, and no API Gateway in the path. It's
synchronous and user-initiated: one button press, one invocation.
Cost: Lambda's free tier covers 1M requests a month and this uses a few dozen. S3 is
serving one ~25 KB file. The only meaningful cost is Bedrock, and Nova Lite is the
cheapest model in the family — a typical run is roughly 2K input and 1.5K output tokens,
so hundreds of runs stay under a dollar. I set a $5 budget alert anyway.
What I Learned
Lambda Function URLs are underrated. I'd assumed API Gateway was mandatory for
anything HTTP. For a single endpoint, a Function URL with CORS configured is a complete
answer and removes an entire service from the diagram.
Cloud tutorials go stale faster than you'd think. Every walkthrough I found told me to
enable Nova Lite on the Bedrock Model access page. That page no longer exists — models
now auto-enable on first invocation. I spent twenty minutes hunting for a button that had
been deliberately removed, when the real problem was an IAM policy. Read the console's own
notices before trusting a blog post; the console told me the page was retired and I nearly
scrolled past it.
Treat model output as untrusted input. This was the real lesson. It's tempting to
json.loads() the response and render it, but a model can return nearly the right
shape. Validating and discarding bad items at the boundary — before anything reaches the
UI — is what makes the difference between a demo that works once and one you can hand to
someone else.Constraints made it better, not worse. "No dependencies, no build step, one HTML
file" sounded like a compromise on Friday. By Sunday it meant I could fix a bug by
editing a file in the Lambda console and clicking Deploy. The whole thing is four files.
Test the way the client actually behaves, not the way that's convenient. My
curl
tests passed while the real website was completely broken, and the gap between them was
one header curl doesn't send by default. A test that doesn't reproduce the client's
actual request isn't evidence the thing works — it's evidence that that specific
request works. Once I added -H "Origin: ..." the bug was obvious in seconds.When two layers can both do a job, pick one. Lambda Function URLs handle CORS, and so
did my code. Neither was wrong on its own; having both is what broke it. Now the platform
owns CORS and my function only returns
Content-Type .Region discipline matters. Bedrock model access, the Function URL and the S3 bucket
all have to line up. I built everything in
us-east-1 and stopped worrying about it.Link to App / Repo
- Live app (HTTPS): https://studykit-kushneet-2026.s3.us-east-1.amazonaws.com/index.html
The repo has the Lambda function, the single-file frontend, the IAM policy, and a
console-only deployment guide — no CLI required, so you can rebuild it from the browser
in about twenty minutes.
Built over the weekend of Friday 31 July – Monday 3 August 2026 for the AWS Builder
Center Weekend Challenge: Turn One Annoying Task Into an App. Deployed in the
us-east-1 (N. Virginia) region, entirely on AWS Free Tier services.Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article