
# Weekend Challenge: Turn One Annoying Task Into an App: StudyMate AI
StudyMate AI is a web app that automates the most tedious part of student life: turning dense lecture notes into study-ready material. Paste your notes (or upload a file) and it instantly generates a concise summary, six flashcards, and a five-question quiz. It runs entirely on AWS — Amazon Bedrock (Nova Lite) for the AI, AWS Lambda + API Gateway for the backend, and Amazon S3 for hosting — all deployed as Infrastructure as Code with AWS SAM.
Vision & What the App Does
As a third-year Computer Science student, one task drains my time every single week: turning a pile of dense lecture PDFs and notes into something I can actually study from. Before every exam I re-read pages of material, manually condense them into summaries, hand-write flashcards, and try to quiz myself. It is slow, repetitive, and honestly the least enjoyable part of studying.
StudyMate AI automates that entire chore. You paste your lecture notes (or upload a text file), click one button, and within seconds you get back a complete study kit:
- A concise summary of the key concepts,
- Six flashcards (question-and-answer pairs) for active recall, and
- A five-question multiple-choice quiz with instant right/wrong feedback so you can self-test.
The problem it solves is simple but universal for students: the repetitive work of transforming raw notes into study-ready material. StudyMate AI does in about five seconds what used to take me an hour, so I can spend my time actually learning instead of reformatting. It's a focused tool that does one thing well — exactly the kind of small, weekly annoyance this challenge is about.
How You Built It
I deliberately kept the scope tight — one input, three useful outputs — because a focused tool that ships beats an over-engineered one that never does.
The frontend is a single self-contained
index.html page (HTML, CSS, and vanilla JavaScript, with zero third-party libraries — it is 100% AWS). It lets the user paste text or upload a .txt / .md file, then displays the results in a clean tabbed layout for Summary, Flashcards, and Quiz. The quiz options highlight green or red on click for immediate feedback.The backend is a single AWS Lambda function in Python. It receives the notes, builds a carefully structured prompt, and calls Amazon Bedrock using the Amazon Nova Lite model through the Bedrock Converse API. The prompt instructs the model to return strict JSON containing the summary, flashcards, and quiz, which the frontend then renders.
Instead of clicking through the AWS Console, I deployed the entire backend as Infrastructure as Code using the AWS SAM CLI. A single
template.yaml defines the Lambda function, the HTTP API, the CORS configuration, and the IAM permissions. Deploying is literally two commands: sam build and sam deploy --guided . This makes the whole stack reproducible — anyone can clone my repo and recreate it exactly.Key decisions & challenges:
- Reliable JSON from an LLM. The model occasionally wrapped its JSON in markdown code fences, which broke parsing. I solved this by stripping ``` fences defensively in the Lambda and tightening the prompt to demand raw JSON only.
- CORS. The browser calling the API directly triggered CORS errors. I fixed this by enabling CORS in the SAM template and returning CORS headers from the Lambda as a backstop, so preflight
OPTIONSrequests always succeed.
- Bedrock "Operation not allowed" error. My first end-to-end test failed with a
ValidationException: Operation not allowedfrom Bedrock. I learned that Amazon Nova must be invoked through a cross-region inference profile, so the model ID needed aus.prefix:us.amazon.nova-lite-v1:0. Because I used SAM with aModelIdparameter, fixing it was a one-line redeploy —sam deploy --parameter-overrides ModelId=us.amazon.nova-lite-v1:0— with no code change. After that, the API returned a full study kit.
- Python version mismatch.
sam buildfailed because my machine had Python 3.14 but the runtime targets 3.12. Since the function only usesboto3(already in the Lambda runtime), I deployed directly without a container build.
AWS Services Used / Architecture Overview
User's Browser (static site on Amazon S3) │ POST { notes } ▼ Amazon API Gateway (HTTP API, POST /generate) ← the trigger │ invokes ▼ AWS Lambda (Python 3.12) │ bedrock:InvokeModel (Converse API) ▼ Amazon Bedrock — Amazon Nova Lite │ returns summary + flashcards + quiz (JSON) ▼ Response rendered back in the browser
Services used:
- Amazon Bedrock (Nova Lite) — the AI engine that generates the study kit.
- AWS Lambda — serverless compute that builds the prompt and calls Bedrock.
- Amazon API Gateway (HTTP API) — the HTTPS endpoint that

- triggers the Lambda.
- Amazon S3 — hosts the static frontend.
- AWS SAM / CloudFormation — provisions the entire stack as Infrastructure as Code.
How the agent is triggered: the user clicks "Generate Study Kit" in the browser, which sends a POST request to API Gateway at
/generate . API Gateway invokes the Lambda, which calls Amazon Bedrock and returns the study kit. Everything runs within the AWS Free Tier.What You Learned
This challenge was my first time using Amazon Bedrock, and I was surprised how little code it took to add real AI to an app — the Converse API is genuinely clean. I learned how to grant a Lambda function IAM permission to invoke Bedrock, and the important lesson that Nova models are invoked via cross-region inference profiles (the
us. prefix) — debugging that Operation not allowed error taught me more than any tutorial. I also got my first hands-on experience with AWS SAM and Infrastructure as Code: defining an entire serverless stack in one template.yaml and deploying it with two commands felt like a superpower compared to clicking through the Console. Finally, I practiced prompt engineering to force reliable structured JSON output. Most importantly, I learned the value of scoping small — by building one thing that works end-to-end, I shipped a genuinely useful app in a weekend.Link to App / Repo
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article