AWS Builder Center
Weekend Productivity Challenge: SecondBrain AI

Weekend Productivity Challenge: SecondBrain AI

A weekend-built AI memory assistant that lets you ask questions about your own notes in plain language, powered by Amazon Bedrock, Lambda, and DynamoDB.

Vision & What the App Does

We forget things we didn't mean to - a decision from a meeting, a saved link, a code snippet, a promise to a colleague. The information isn't gone, just buried across notes, chats, and tabs, making it slower to find than to redo.
SecondBrain AI solves this by letting you talk to your own notes. You write things down as they happen, then later ask a plain-language question - like "what did I decide about the pricing model?" - and get an answer pulled directly from your own past notes.
The experience is two simple screens: one to add a note, one to ask a question. Behind the scenes, each note is converted into an embedding (a vector representation of its meaning), so questions retrieve conceptually related notes even when the wording doesn't match exactly - the core difference between a memory assistant and basic keyword search.

How I Built It

The build follows a retrieval-augmented generation (RAG) pattern: retrieve relevant personal notes, then let the model generate an answer grounded in them. The key decision was resisting over-engineering — instead of standing up a dedicated vector database, embeddings are stored directly in DynamoDB and compared in-memory inside the Lambda function at query time. For a personal-scale note collection, this kept the architecture simple and fast to ship.
The main challenge was retrieval quality without a dedicated search index, solved with a similarity threshold: notes below it are excluded from the answer context, so the app can honestly say "I don't have anything on that yet" instead of forcing a weak match into a confident-sounding wrong answer.
The MVP was also scoped deliberately tight — text notes only, no image or voice ingestion — so the core loop could be fully working and demonstrable within the challenge window rather than partially built across several input types.

AWS Services Used / Architecture Overview

The application is built entirely on managed AWS services, chosen specifically to avoid provisioning or maintaining any servers:
  • Amazon Bedrock — powers two AI steps: generating vector embeddings for each note and question (Titan Text Embeddings), and generating the final natural-language answer from the retrieved notes.
  • AWS Lambda — two core functions: one to ingest a new note (embed it and store it), and one to answer a question (embed the question, retrieve similar notes, generate an answer).
  • Amazon API Gateway — exposes the Lambda functions as HTTP endpoints that the front end calls.
  • Amazon DynamoDB — stores each note along with its embedding vector and timestamp, acting as the app's entire memory store.
  • AWS Amplify — hosts and deploys the front-end application, giving the app a live, publicly accessible URL.
  • IAM (Identity and Access Management) — each Lambda function runs under its own execution role, scoped to least privilege: the ingest and ask functions are granted only  dynamodb:PutItem / GetItem / Scan  on the specific  notes  table and  bedrock:InvokeModel  on the specific embedding and generation models used — not broad or account-wide permissions. This keeps the blast radius of any single function limited strictly to what it needs to do its job.

Request flow:

  1. User submits a note in the browser → API Gateway → Lambda generates an embedding via Bedrock → note and embedding saved to DynamoDB.
  1. User asks a question → API Gateway → Lambda embeds the question → compares it against stored note embeddings → sends the most relevant notes plus the question to Bedrock → returns a generated answer to the user.
This is a fully serverless architecture: no EC2 instances, no server management, and it scales down to zero cost when idle, which fits well within AWS Free Tier usage for a personal-scale tool.

What I Learned

The instinct at the start was to build something maximalist — voice input, image uploads, a full vector database — but the more valuable lesson was cutting scope ruthlessly in favor of a smaller thing that actually works end-to-end.
A specific technical takeaway was learning to write IAM roles from scratch with least-privilege in mind, rather than defaulting to broad permissions to move faster. Scoping each Lambda's execution role down to only the exact DynamoDB actions and Bedrock model it needed took a bit more upfront thought, but made the whole system easier to reason about and safer to hand off or extend later.
On the AI side, the biggest lesson was how much a similarity threshold matters in a RAG pipeline. Without one, the app would always return "an answer," even with no real basis for it — a serious trust problem for a memory tool. Building in an honest "I don't know" path made the app more trustworthy, even at the cost of less impressive demo answers in some cases.
Finally, the project reinforced that the simplest AWS-managed path — DynamoDB plus in-Lambda logic, tightly scoped IAM, no dedicated servers — is often the right starting point over a more "proper" but heavier piece of infrastructure, especially when the real constraint is time rather than scale.

Link to App



Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article