Survey analyzer
A serverless analyzer that makes sense of open-ended survey answers. It reads every free-text response, groups them into the handful of themes people actually raised, counts how common each theme is, pulls a representative quote for each, and emails the owner a short “here’s what customers are telling you” summary. Anything urgent — an angry customer, a threat to leave — gets flagged for a human right away. Seven posts on the same system — one diagram at a time — with an engineering reference at the end.
-
01
A survey analyzer on AWS for a few dollars a month
The whole system on one page — an answer intake, a grouping piece, and a summary piece, plus the urgent lane that jumps the queue for anything that can’t wait.
-
02
How a survey answer gets collected
Three lanes feed the answer store — a form-submit lane that posts each response the moment it’s sent, an inbox-forwarding lane for email replies and exports, and a Drive sheet you paste exports into.
-
03
How answers get grouped into themes
A weekly pass turns each answer into a vector with Titan embeddings, clusters the vectors with plain code, then asks Haiku to name each cluster and pick one real quote that captures it. The math is deterministic; the model only labels.
-
04
How a summary reaches the owner
Sonnet writes a short summary from the grouped themes — never from one cherry-picked answer — and four guardrails sit between the draft and the email that lands in the owner’s inbox each week.
-
05
How an urgent answer gets flagged
Every answer runs a quick urgent check the moment it lands. An angry customer, a threat to leave, a safety or legal concern jumps the weekly queue and goes straight to a human. Each flag is logged.
-
06
What the survey analyzer costs
A few dollars a month at SMB volume. The grouping pass runs once a week, the urgent check uses the cheap model on each answer, and the summary is one larger call — so the bill stays small.
-
07
Engineering reference: the survey analyzer architecture
Same system, drawn purely for engineers. Service names, resource identifiers, region, Bedrock model IDs, the S3 Vectors index, Lambda inventory, IAM scopes, EventBridge Scheduler config, and the DynamoDB schemas.
Frequently asked questions
- What is a survey analyzer?
- A small serverless system that makes sense of open-ended survey answers. It reads every free-text response, groups them into the handful of themes people actually raised, counts how common each theme is, pulls a representative quote for each, and emails the owner a short “here’s what customers are telling you” summary. It also flags anything urgent — like an angry customer — for a human right away.
- How much does it cost to run?
- About $3.20/month at typical small-business volume (around 500 responses a month). The fixed cost is essentially zero. The variable cost is dominated by the embeddings and the weekly grouping pass; the urgent-answer check runs on every response but uses the cheap model, so it stays small. At 5,000 responses a month the bill lands around $18.
- Which AWS services does it use?
- Lambda (Python 3.14, arm64) with a Function URL for the form-submit endpoint, EventBridge Scheduler for the weekly grouping pass, DynamoDB on-demand, S3 (with versioning), S3 Vectors for the answer embeddings, SES outbound for the summary email, SNS for the urgent flag, Secrets Manager, CloudWatch Logs (7-day retention), AWS Budgets, and Bedrock — Titan Text Embeddings V2 for the answer vectors, Claude Haiku 4.5 to name each theme and screen for urgent answers, and Claude Sonnet 4.6 to write the summary. No API Gateway, no NAT Gateway, no always-on compute.
- Where do the answers come from?
- Three lanes feed the answer store: a form-submit lane where your survey form posts each response to a small endpoint, an inbox-forwarding lane where someone forwards an email reply or an export, and a Drive sheet you paste exports into. A small
drive-syncLambda mirrors the sheet to S3 every 15 minutes; the analyzer reads from S3 to keep Drive calls predictable and to get S3 versioning for free. - Does the analyzer use AI?
- Yes, but only where it earns its place. Free text is exactly the kind of messy input plain code can’t group, so the analyzer uses Titan embeddings to turn each answer into a vector, clusters those vectors with plain code, then asks Claude Haiku 4.5 to name each cluster and pick a representative quote. Claude Sonnet 4.6 writes the short summary. The urgent-answer check is a small Haiku call per response. The clustering math itself is plain Python.
- How does it spot an urgent answer fast?
- Every answer runs through a quick urgent check the moment it lands — a small Claude Haiku 4.5 call that looks for an angry customer, a threat to leave, a safety or legal concern, or a request for a callback. If it trips, the analyzer skips the weekly wait and sends the answer straight to a human via SNS — email or Slack — with the full text and why it was flagged. Everything else waits for the weekly summary.
- What does the weekly summary look like?
- A short email. The top line is the response count and the overall mood. Below that, the handful of themes people raised — each with a plain-English name, how many answers fell into it, and one real quote that captures it. At the bottom, anything that got flagged urgent during the week and how it was handled. It’s the kind of one-page read an owner can skim with their coffee, written by Claude Sonnet 4.6 from the grouped answers, never from a single cherry-picked response.