AWS Builder Center
Weekend Annoying Task Challenge: Comment Agent

Weekend Annoying Task Challenge: Comment Agent

I never reply to comments on my LinkedIn posts because writing ten decent ones takes an hour and they come out sounding fake anyway. So I built something that drafts them. Paste a comment, pick a tone, get three options, copy the one you'd actually say. It never posts anything. Built on Bedrock, Lambda, API Gateway, DynamoDB, EventBridge, SES and S3, deployed from one bash script.

aws SBCL @ CSU Chico
lets get that jacket!
I post on LinkedIn. People comment. I almost never reply, because writing ten decent replies takes an hour and they all end up sounding fake anyway.
LinkedIn just shipped a "this is AI slop" button. Which is funny, because every tool that offers to fix my problem is the thing that made that button necessary.
Comment Agent drafts LinkedIn comments and replies that don't read like that. You paste in a comment someone left on your post, or a post you want to comment on. Pick a tone. You get three drafts. You copy the one you'd actually say and paste it yourself.
It never posts anything. No LinkedIn login, no permissions, no automation into the feed. It's a clipboard.
There's also a watchlist. Save something and a Lambda drafts it overnight and emails you at 7am. Nothing saved means no email.

How You Built It

Started way bigger. I wanted it to watch my LinkedIn and reply to comments on its own.
That doesn't work. LinkedIn has no API that lets an app read your feed or your comments. It's partner-tier, gated behind an approval process that takes weeks. Scraping breaks their terms and would put my account at risk. So I killed that and made the input a paste box.
Then I built something dumb. If your watchlist was empty, the morning email still showed up with "5 comments you could leave today," generated off five fake posts I hardcoded into the source. Fake people. Fake posts.
Demoed great. Also the exact thing I built this app to argue against — generated text with nothing real behind it, on a schedule, so a number stays green. Deleted it. Now if nothing's saved, no email goes out.
Bugs I hit, all of them found by calling the deployed endpoint instead of trusting my own code:
  • Bedrock throws  ValidationException  if you set  temperature  and  topP  together on Claude. Pick one. Every draft request was failing until I dropped  topP .
  • DynamoDB hands back numbers as  Decimal  and  json.dumps  refuses them. My  GET /watch  route 500'd the first time a record had a TTL on it.
  • The digest marked items done before the email sent. If SES failed, the draft was gone and the thread was marked finished. Moved it to after.
The prompt file is the actual product and it's mostly a list of stuff the model isn't allowed to do. No "I'm thrilled to share." No "Here's the thing." No rocket emoji, no bullet lists, no ending with "Thoughts?" Telling it what not to write did way more than telling it what to write.

AWS Services Used / Architecture Overview

Plain text
┌────────────────────────┐
Browser ─────────▶│ S3 (static website) │
│ └────────────────────────┘
│ fetch()
▼
┌──────────────────┐ ┌──────────────────────┐ ┌──────────────────────┐
│ API Gateway │──▶│ Lambda │──▶│ Bedrock │
│ (HTTP API) │ │ comment-agent-api │ │ Claude Sonnet 4.5 │
│ throttled 2 r/s │ └──────────┬───────────┘ └──────────────────────┘
└──────────────────┘ │
▼
┌──────────────────────┐
│ DynamoDB │
│ watchlist, 30d TTL │
└──────────┬───────────┘
│
┌──────────────────┐ ▼
│ EventBridge │ ┌──────────────────────┐ ┌──────────┐
│ cron(0 14 * *) │──▶│ Lambda │──▶│ SES │──▶ inbox
│ = 7am Pacific │ │ comment-agent-digest│ └──────────┘
└──────────────────┘ └──────────────────────┘
  • Bedrock — Claude Sonnet 4.5 through the Converse API. Writes every draft.
  • Lambda — two functions off one 8KB zip. No dependencies, boto3 is already in the runtime.
  • API Gateway — HTTP API, one route, the Lambda handles its own routing. Throttled to 2 req/s because it's public and every call spends tokens.
  • DynamoDB — the watchlist. On-demand, 30 day TTL so it cleans itself up.
  • EventBridge — this is how the agent gets triggered.  cron(0 14 * * ? *) , which is 14:00 UTC, which is 7am Pacific. Fires the digest Lambda. No server, no polling.
  • SES — sends the morning email.
  • S3 — hosts the front end. One HTML file, no build step.
  • IAM — one role, scoped to the one table.
The whole stack comes up from one bash script. Safe to run over and over.

What I Learned

Test the deployed thing, not the code. All three of my bugs looked fine on screen and broke the second I curl'd the real endpoint.
A Bedrock model showing up in the model list doesn't mean your account can call it. Only way to know is to actually call it. I also found out a model I assumed was my backup had been retired out from under me.
SES sandbox will get you. Both the sender and the recipient have to be verified or nothing sends, and clicking that verification link isn't something a deploy script can do for you. So the code has to treat a failed send as something to retry, not something to swallow.
Hardest part this weekend wasn't code. It was deleting the fake fallback, which demoed better than what I ended up shipping.
I worked restaurant kitchens for four years before I got into any of this. Same rule applies. Don't send it if you wouldn't eat it.

Link to App and Repo

Paste any LinkedIn comment or post in and hit Draft it. Nothing gets saved unless you hit Watch this thread, and nothing gets posted anywhere.
Repo has  infra/deploy.sh , which brings the whole thing up from an empty AWS account — role, table, both Lambdas, API, schedule, SES check, S3 site.
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