Serverless With Lambda
Lambda is the heart of the memory pipeline.
Before I Forget uses the frontend only as the quiet entry point. The real backend shape is serverless: a secure Next.js API route starts Step Functions, Step Functions runs a chain of Lambda functions, and the final keepsake is stored in DynamoDB.
Live workflow ARN
arn:aws:states:us-west-2:085193942503:stateMachine:before-i-forget-memory-workflow
Architecture takeaway
This is a serverless workflow with AWS services connected behind the product experience. The app is structured around Lambda boundaries that can run independently, scale to zero, and evolve without changing the UI.
01
User starts a memory
Story, recipe, gratitude, or voice note
02
Next.js frontend
Vercel UI only; no AWS secrets in browser
03
Secure API route
Server-side bridge signs AWS requests
04
Step Functions
Starts the Lambda chain for story processing
05
Lambda: create session
Creates memory/session IDs and status
06
Lambda: process story
Normalizes story text and metadata
07
Lambda: transcript
Transcribe-ready voice-to-text boundary
08
Lambda: translate
Translate-ready multilingual boundary
09
Lambda: memory AI
Bedrock-powered keepsake generation
10
Lambda: gratitude letter
Creates the emotional keepsake letter
11
Lambda: save result
Writes final MemoryCard to DynamoDB
12
S3 + Polly ready
Presigned uploads and spoken letters
01
User starts a memory
Story, recipe, gratitude, or voice note
02
Next.js frontend
Vercel UI only; no AWS secrets in browser
03
Secure API route
Server-side bridge signs AWS requests
04
Step Functions
Starts the Lambda chain for story processing
05
Lambda: create session
Creates memory/session IDs and status
06
Lambda: process story
Normalizes story text and metadata
07
Lambda: transcript
Transcribe-ready voice-to-text boundary
08
Lambda: translate
Translate-ready multilingual boundary
09
Lambda: memory AI
Bedrock-powered keepsake generation
10
Lambda: gratitude letter
Creates the emotional keepsake letter
11
Lambda: save result
Writes final MemoryCard to DynamoDB
12
S3 + Polly ready
Presigned uploads and spoken letters
Seven Lambda functions
createMemorySession
Creates a session ID, createdAt timestamp, and first workflow status.
processStoryInput
Cleans the story text and extracts basic story metadata.
generateTranscript
Defines the Transcribe boundary so audio can become text.
translateMemory
Defines the Translate boundary for multilingual family access.
generateMemoryCard
Creates the keepsake structure powered by the AI layer.
generateGratitudeLetter
Turns the memory into a thank-you letter.
saveMemoryResult
Writes the final MemoryCard-shaped item into DynamoDB.
Implemented for MVP
- Next.js API routes call AWS only from the server.
- Step Functions starts and observes the Lambda workflow.
- Seven Lambda functions form the story keepsake pipeline.
- DynamoDB stores generated memory results by memoryId.
- S3 presigned upload helper keeps media bytes out of Lambda.
- Transcribe starts from S3 audio uploads for voice notes and phone-call recordings.
- Translate can call AWS Translate for multilingual memory cards.
- Claude via Amazon Bedrock powers the memory-generation layer.
Claude via Amazon Bedrock supports interview generation, emotional summarization, and gratitude-letter generation.