Sentiment monitor
A serverless monitor that watches the mentions you point it at — reviews, social posts, comments — reads the mood of each one, tracks whether the overall tone is rising or falling, and sends a short weekly pulse plus an instant alert if something starts going badly. It only listens and reports; it never posts replies, and it flags the angriest items for a human first. Seven posts on the same system — one diagram at a time — with an engineering reference at the end.
-
01
A sentiment monitor on AWS for a few dollars a month
The whole system on one page — a collector, a reader, and a reporter, plus the one firm rule they all share: listen and report, never reply.
-
02
How a mention gets collected
Three sources feed one queue — review-site feeds, a social-listening export, and your own comment webhooks — each new mention de-duplicated so the same review is never read twice.
-
03
How the mood of a mention gets read
One Bedrock Haiku 4.5 call per mention returns a mood score and a one-line reason. The score is stored; the rolling trend is plain Python on top of it.
-
04
How an angry mention reaches a human
Two triggers, both deterministic: a single very angry mention, or a sharp drop in the rolling average. The angriest item is listed first, and a human reads it before anything is done.
-
05
How the weekly pulse gets sent
A short Monday email: the mood trend line, the count by source, the standout good and bad mentions, and what changed since last week. One Bedrock call writes the summary line; the rest is a layout.
-
06
What the sentiment monitor costs
A couple of dollars a month at SMB volume. The cost is one cheap model call per mention; the trend math, the alerts, and the weekly pulse are pennies on top.
-
07
Engineering reference: the sentiment monitor architecture
Same system, drawn purely for engineers. Service names, resource identifiers, region, Bedrock model IDs, Lambda inventory, IAM scopes, the SQS and DLQ config, EventBridge Scheduler config, and the DynamoDB schemas.
Frequently asked questions
- What is a sentiment monitor?
- A small serverless system that watches the mentions you point it at — reviews, social posts, comments — reads the mood of each one, tracks whether the overall tone is rising or falling, and sends a short weekly pulse plus an instant alert if something starts going badly. It only listens and reports; it never posts replies. The angriest items are flagged for a human first.
- How much does it cost to run?
- About $2.40/month at typical small-business volume (around 200 mentions a month). The fixed cost is essentially zero. The variable cost is dominated by the per-mention mood read on Bedrock Haiku 4.5, which is a fraction of a cent each. The weekly pulse and the trend math are pennies. At 2,000 mentions a month the bill lands around $9.
- Which AWS services does it use?
- Lambda (Python 3.14, arm64), EventBridge Scheduler for polling and the weekly pulse, SQS with a dead-letter queue to even out bursts, DynamoDB on-demand, S3 (with versioning), SES outbound, SNS for the instant alert, Secrets Manager, Parameter Store, CloudWatch Logs (7-day retention), AWS Budgets, and Bedrock (Claude Haiku 4.5 via Global cross-Region inference) for reading each mention’s mood. No API Gateway, no NAT Gateway, no always-on compute, and the monitor never posts anything back.
- Where does it get the mentions?
- From the sources you point it at in a small config doc — review-site feeds, a social-listening export, your own comment webhooks. A poller Lambda checks each source on a schedule, drops new mentions into a queue, and each one is de-duplicated against what it has already seen so the same review never gets read twice.
- Does it ever reply on its own?
- No. This is the firmest rule in the design. The monitor only reads and reports. It never posts a reply, never sends a public response, never touches your accounts in a way a customer could see. The most it does on its own is email you a weekly pulse and fire one instant alert when the mood turns sharply negative. Any actual reply is a human’s job.
- How does it decide what is an instant alert?
- Two triggers, both in plain Python. A single very angry mention (mood score at or below the configured floor, default strongly negative) fires an alert on its own. And a sharp drop in the rolling average — the tone falling faster than the configured slope over the trailing window — fires a trend alert even if no single mention is extreme. The angriest items are listed first so a human reads the worst one before anything else.
- Does it use AI?
- For one job only: reading the mood of each mention. Bedrock Haiku 4.5 returns a mood score and a one-line reason per mention. Everything else — the trend math, the alert thresholds, the de-duplication, the weekly pulse layout — is plain deterministic Python. The model never decides whether to alert and never writes a reply; it only labels mood.