AWS Builder Center

Weekend Agent Challenge: Stale Repo Watcher

An always-on agent that checks a GitHub repo for stale issues and PRs on a schedule, summarizes them with Amazon Bedrock (Nova Micro), and emails a prioritized nudge report — built with Lambda, EventBridge Scheduler, SNS, and Bedrock.

Weekend Agent Challenge: Stale Repo Watcher

Tag: #agents

Vision & What the Agent Does

Repos accumulate issues and pull requests that quietly go stale — no comments, no updates, nobody notices until a contributor asks "hey, what happened to this?" Stale Repo Watcher solves that by checking in on a repo every day, on its own, before I even open GitHub.
  • Trigger: Runs automatically every morning via an EventBridge Scheduler cron rule — no manual click.
  • What it does on its own: Pulls all open issues/PRs from a target GitHub repo, filters for anything untouched for 7+ days, and sends the list to Amazon Bedrock (Nova Micro) to turn into a short, prioritized nudge report with a suggested next action per item.
  • How it reports back: Publishes the report to an SNS topic, which emails it to me directly. No dashboard to open — the result is just waiting in my inbox.

How I Built It

  1. Started with the core loop: fetch issues → filter by staleness → summarize → notify. Kept it to a single Lambda function rather than splitting into multiple functions/state machines, since the logic is linear and doesn't need orchestration.
  1. Used the public GitHub REST API (no auth needed for public repos) to avoid burning weekend time on OAuth setup.
  1. Chose Nova Micro over larger Bedrock models — it's fast, cheap, and more than sufficient for summarizing a short list of items into a nudge report.
  1. Key challenge: getting EventBridge Scheduler's IAM role permissions right — Scheduler needs its own execution role trusting  scheduler.amazonaws.com , separate from the Lambda's own execution role. Easy to get wrong; fixed by creating a dedicated scheduler role scoped only to  lambda:InvokeFunction  on this one function.
  1. Tested by invoking the Lambda manually first ( aws lambda invoke ) before trusting the schedule to fire correctly.
One small but important design decision: the Lambda reads the target repo name and staleness threshold from environment variables rather than hardcoding them, so it's trivial to point the agent at a different repo or change the 7-day window without redeploying code.

AWS Services Used / Architecture Overview

  • Amazon EventBridge Scheduler — cron trigger, runs daily without any manual action
  • AWS Lambda — core agent logic (Python 3.12): fetch, filter, summarize, notify
  • Amazon Bedrock (Nova Micro) — summarizes stale items into a short actionable report
  • Amazon SNS — delivers the report by email
  • IAM — two scoped roles: one for Lambda execution, one for Scheduler-to-Lambda invocation
EventBridge Scheduler (daily cron)
│
▼
AWS Lambda ──► GitHub REST API (fetch open issues/PRs)
│
▼
Amazon Bedrock (Nova Micro) — summarize + draft nudge report
│
▼
Amazon SNS ──► Email report
(screenshot : EventBridge Scheduler rule firing, and the email report received)
page 1 : create a stale repo watcher

page 2 : IAM roles

page 3 : Event Bridge scheduler

page 4 : SNS creation

page 5 : Result email along with subscription email before.


What I Learned

  • EventBridge Scheduler's IAM model is stricter than I expected — it will not reuse a Lambda's own execution role without an explicit trust relationship for  scheduler.amazonaws.com .
  • Nova Micro is well suited for small, structured summarization tasks like this — no need to reach for a larger model for a job this size.
  • Keeping the agent to a single Lambda function, rather than over-architecting with Step Functions, made the weekend timeline realistic.
  • Designing for "zero-click delivery" — where the output lands in your inbox rather than requiring you to open a dashboard — meaningfully changes how useful an agent actually is in practice. If you have to remember to check it, it's just another tab to forget.

Link to App or Repo

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