AWS Builder Center
My AI Had Amnesia. So I Gave It a Second Brain on AWS.

My AI Had Amnesia. So I Gave It a Second Brain on AWS.

Every new AI chat starts from zero. I turned my Obsidian vault into long-term memory for Claude using Amazon Bedrock Knowledge Bases and S3 Vectors.

My AI Had Amnesia. So I Gave It a Second Brain on AWS.

How I turned an Obsidian vault into long-term memory for Claude, first on my laptop and then on Amazon Bedrock Knowledge Bases.
Cover: My AI had amnesia. So I gave it a second brain.




The conversation I kept having

Every new chat started the same way.
"Hi! So, I'm building a profit-margin auditor for our Mercado Livre store. It's Python, it talks to the Mercado Livre API, we use OAuth, and the costs come from a spreadsheet, and last week we decided that..."
Five paragraphs later, I finally got to my actual question.
The next day, a new chat. Same five paragraphs.
I'm a Systems Analysis and Development student, and I also run marketplace operations for an auto parts company. That means I juggle a lot of context: a Java finance app for college, a React challenge with a deployment deadline, Python automations for work. And every time I opened an AI assistant, it greeted me like a stranger.
Three chat windows on different days where the user re-explains the same project and the AI responds

This isn't a bug. Large language models don't remember you between sessions. Each conversation starts from zero. Everything the model "knows" about your project is whatever you paste into the context window right now.
That costs you three things:
  1. Time. You become the model's memory, re-typing the same background over and over.
  1. Tokens. Re-sending a wall of context on every request isn't free.
  1. Quality. You always forget something. The model fills the gap with a guess, and the guess contradicts a decision you made two weeks ago.
I didn't need a smarter model. I needed a model with a memory.



The idea: an external brain made of plain Markdown

If you've used  Obsidian , you know it's just a folder of  .md  files that link to each other with  [[wikilinks]] . Open the graph view and it looks like a neural network: hundreds of glowing nodes and connections.
Obsidian graph view of my vault: notes as nodes, wikilinks as connections

My vault in graph view. Every dot is a note, every line is a link.
Let's be precise, though: it's not a neural network. It's a knowledge graph, a set of notes and relationships. That's exactly what makes it useful. The model already does the "thinking". What it's missing is a reliable, human-readable place to read from and write to between sessions.
So the plan was simple:
  • The vault is the memory. Decisions, project summaries, lessons learned, all as Markdown.
  • Claude is the reasoning. Before a task it reads the relevant notes. After the task it writes down what changed.
  • The memory is mine. Plain files that I can read, edit, version with Git, and fix when they're wrong.



Step 1: The local version (Claude + Obsidian on my laptop)

The fastest way to start is to let Claude work directly inside the vault folder. There are two common ways:
  • Claude Code running in the vault directory, so it can read, search, and create notes as files.
  • An MCP (Model Context Protocol) server for Obsidian, so Claude Desktop can search and edit notes as tools.
Either way, the real trick is a small instruction file at the root of the vault. With Claude Code that file is  CLAUDE.md :
# How to use this vault

You are my engineering assistant. This vault is your long-term memory.

## Structure
- /projects/<name>.md → one note per project: goal, stack, status, decisions
- /decisions/YYYY-MM-DD-<topic>.md → why we chose X over Y
- /learnings/<topic>.md → things that broke and how we fixed them

## Rules
1. Before answering about a project, read its note in /projects first.
2. After any meaningful decision, create a note in /decisions and link it
from the project note with [[wikilinks]].
3. Never store passwords, tokens, or customer data in this vault.
4. Keep notes short. Update existing notes instead of duplicating them.
Now the loop looks like this:
  1. Read: "What's the status of the margin auditor?" Claude opens  projects/margin-auditor.md  and follows the links.
  1. Work: it answers or writes code with the right context, not my half-remembered summary.
  1. Write back: "We switched to refreshing the OAuth token on every run." Claude creates a decision note and links it.
The first time a new session answered "Last week you decided to refresh the token on every run because..." without me typing a word, it felt like magic.

But the local version hit a wall

After a few weeks I ran into three limits:
  • It only lives on my laptop. On my phone, or at work, the memory doesn't exist.
  • It doesn't scale well. As the vault grows, the model has to open more and more files to find what matters, and that means more tokens and more misses.
  • Only one client can use it. I wanted other tools, like a small internal app or a chatbot, to query the same memory.
That's when I moved the brain to the cloud.



Step 2: Moving the brain to AWS

The goal: keep writing notes in Obsidian like always, but let any application ask questions about them through Claude on Amazon Bedrock.
Architecture: Obsidian vault synced to Amazon S3, indexed by Bedrock Knowledge Base into S3 Vectors, queried by Claude on Bedrock

Here's the architecture:
Piece
AWS service
What it does
Storage
Amazon S3
Holds a copy of the vault ( .md  files)
Indexing
Bedrock Knowledge Bases
Splits notes into chunks, creates embeddings, keeps them in sync
Vector store
Amazon S3 Vectors
Stores the embeddings cheaply (no cluster to keep running)
Reasoning
Claude on Amazon Bedrock
Answers using only the retrieved notes, with citations
This pattern is called RAG (Retrieval-Augmented Generation). Instead of shoving the whole vault into the prompt, the system retrieves the few chunks that matter and lets Claude generate an answer from them.

2.1 Sync the vault to S3

aws s3 sync ~/Obsidian/MyVault s3://my-second-brain-vault \
--exclude ".obsidian/*" \
--exclude ".trash/*" \
--delete
The  .obsidian/  folder holds editor settings (themes, plugins), not knowledge, so it stays out.

2.2 Create the Knowledge Base

In the Bedrock console → Knowledge Bases → Create:
  1. Data source: Amazon S3 →  s3://my-second-brain-vault 
  1. Embeddings model: an Amazon Titan Text Embeddings model
  1. Vector store: quick-create an Amazon S3 Vectors store
  1. Create, then click Sync.
Why S3 Vectors? For a personal vault with a few hundred notes, I didn't want to pay for an always-on vector database. S3 Vectors is pay-per-use storage and querying, which fits a "second brain" that you query a few dozen times a day.

2.3 Ask your brain a question

A few lines of Python with  boto3 :
import boto3

client = boto3.client("bedrock-agent-runtime", region_name="us-east-1")

KB_ID = "YOUR_KNOWLEDGE_BASE_ID"
MODEL_ARN = "YOUR_CLAUDE_MODEL_OR_INFERENCE_PROFILE_ARN"

def ask_brain(question: str) -> None:
response = client.retrieve_and_generate(
input={"text": question},
retrieveAndGenerateConfiguration={
"type": "KNOWLEDGE_BASE",
"knowledgeBaseConfiguration": {
"knowledgeBaseId": KB_ID,
"modelArn": MODEL_ARN,
},
},
)

print(response["output"]["text"])
print("\nSources:")
for citation in response.get("citations", []):
for ref in citation["retrievedReferences"]:
print(" -", ref["location"]["s3Location"]["uri"])

ask_brain("Why did we change how the OAuth token is refreshed in the margin auditor?")
The part I love is the citations. The answer comes with the exact notes it used, like  s3://my-second-brain-vault/decisions/2026-10-08-oauth-refresh.md . If the answer is wrong, I know which note to fix. That's something a model's built-in "memory" can never give you.

2.4 Keep it in sync automatically

A brain that's a week out of date is a bad brain. I wrapped the sync in a tiny script that also starts a re-index:
#!/usr/bin/env bash
set -euo pipefail

aws s3 sync ~/Obsidian/MyVault s3://my-second-brain-vault \
--exclude ".obsidian/*" --exclude ".trash/*" --delete

aws bedrock-agent start-ingestion-job \
--knowledge-base-id "$KB_ID" \
--data-source-id "$DATA_SOURCE_ID"
Run it at the end of the day, or schedule it. Only new or changed files are re-indexed.



What I learned (the honest part)

1. Links don't automatically become "understanding". Bedrock indexes text chunks. It doesn't read your Obsidian graph. A  [[wikilink]]  is just text to it. The fix: write notes that make sense on their own, with a one-line summary at the top and a short "Related:" section that describes why notes are connected.
2. Small, focused notes beat giant ones. One decision per note retrieves far better than a 3,000-word "everything about project X" page.
3. Your vault is now data in the cloud, so treat it that way. Keep the bucket private, use least-privilege IAM, and keep secrets and customer data out of the vault. That rule was in my  CLAUDE.md  from day one for a reason.
4. Local and cloud aren't rivals. I still use Claude Code inside the vault to write memory. Bedrock is how everything else reads it.



Cost

For a personal vault, the cost is driven by three things: the embeddings when you sync, the vector storage and queries in S3 Vectors, and the Claude tokens per question. Because nothing runs 24/7, idle days cost close to nothing.
Tip: set an AWS Budgets alert before you start. It takes two minutes and saves surprises.



Before vs. after

Before
After
Re-explaining my project in every chat
Claude reads the project note itself
Decisions lost in old conversations
Every decision is a linked, searchable note
"I think we decided...?"
Answers with citations to the exact note
Memory only on my laptop
Any app can query it through Bedrock



What's next

In Part 2, I'll close the loop: an S3 event triggers an AWS Lambda function that re-indexes the Knowledge Base automatically whenever a note changes. I'll also put a small chat interface in front of it so I can ask my second brain questions from my phone.
If your AI also has amnesia, give it a notebook. It turns out that's most of what it needs.


Thanks for reading! If you build your own version, tell me in the comments what you put in your vault.
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