AWS Builder Center
Weekend Showcase Challenge: ChangeLens

Weekend Showcase Challenge: ChangeLens

ChangeLens is a small autonomous agent for that job. A user adds a public URL once, tells it what matters, and lets it keep watch. ChangeLens saves the first version as a baseline, checks the page on a schedule, detects real content changes, and explains those changes in plain language.

Cloud Engineer and Educator



Most useful information on the internet is not static. Scholarship deadlines move, pricing pages change, admission requirements are updated, and product documentation quietly gains an important paragraph.
The problem is not that these pages are difficult to read once. The problem is remembering to revisit every page at exactly the right time — and then working out whether a small update actually matters.
ChangeLens is a small autonomous agent for that job. A user adds a public URL once, tells it what matters, and lets it keep watch. ChangeLens saves the first version as a baseline, checks the page on a schedule, detects real content changes, and explains those changes in plain language.

The useful part is the order of operations

An expensive language model should not be asked whether a page changed when a hash can answer that question deterministically.
fetch page
↓
extract readable content
↓
SHA-256 hash
↓
same hash? ── yes ──> record a check and stop
│
no
↓
compare the previous and current snapshots
↓
send only the difference to Amazon Bedrock
↓
store category, importance, summary, and why it matters

This is the central design decision in ChangeLens. It reduces Bedrock calls, keeps the experience fast for unchanged pages, and makes the behavior easy to explain and test.

What was built

The project is a single-function AWS SAM application with a deliberately small surface area:
Concern
AWS service
Purpose
Browser and API
Lambda Function URL
Serves the dashboard and JSON API without a separate frontend server
Monitor metadata
DynamoDB
Stores URL, preferences, current hash, check counts, and latest status
Change history
DynamoDB
Stores one record for each detected content change
Full page versions
S3
Keeps the larger normalized snapshots out of DynamoDB
Change intelligence
Amazon Bedrock
Classifies meaningful changes and explains their impact
Autonomous checks
EventBridge Scheduler
Invokes the dispatcher every hour
Diagnostics
CloudWatch Logs
Captures fetch, comparison, and model errors
The Lambda function handles the web UI, monitor creation, manual checks, history, questions about a monitor, and the scheduled dispatcher. Keeping the first version in one function makes the demo simple to run while preserving clear boundaries in the code.

Creating a monitor

The first scan happens during monitor creation:
  1. Validate that the URL is public HTTP or HTTPS.
  1. Fetch the page with a descriptive user agent and a timeout.
  1. Remove scripts, styles, markup, common navigation, cookie prompts, and other presentation noise.
  1. Keep readable text and calculate its SHA-256 hash.
  1. Write the baseline snapshot to S3.
  1. Write monitor metadata to DynamoDB.
The optional instruction field is part of the monitor. For example:
Tell me only if application dates, AWS credits, or eligibility changes.
That instruction is included in the Bedrock analysis prompt. It lets the model distinguish an important policy update from a harmless page decoration change.

Detecting and explaining a change

On a scheduled or manual check, ChangeLens fetches and normalizes the page again. If the hash is unchanged, it updates  lastCheckedAt  and does not invoke Bedrock.
When the hash differs, the function loads the previous S3 snapshot and creates a line-oriented diff. The model receives the added and removed content, rather than the entire page history. It returns a constrained JSON result:
{
"relevant": true,
"importance": "high",
"category": "deadline",
"summary": "The submission deadline moved from August 30 to September 5.",
"explanation": "Applicants now have six additional days to submit.",
"before": "August 30",
"after": "September 5"
}

The supported categories are deadline, pricing, eligibility, feature, policy, availability, schedule, requirement, contact, documentation, and other. Importance is one of critical, high, medium, or low.
The application has a deterministic fallback classifier. If Bedrock is temporarily unavailable, a change is still saved with a conservative category and summary. That makes page monitoring resilient instead of turning a model outage into a lost check.

A quiet dashboard

The UI is intentionally compact. The home screen answers four questions quickly:
  • How many pages are being watched?
  • How many changed this week?
  • Which changes look important?
  • When did the last check run?
Each monitor card shows its latest summary and links to a timeline. The timeline includes before and after values, the importance and category, and the explanation of why the change matters. The “Ask ChangeLens” panel can answer questions such as “Did eligibility change?” using the monitor's recorded change history.

Deploying with AWS SAM

The project includes  template.yaml ,  samconfig.toml , and a Node.js 22 Lambda handler. With AWS credentials configured, the normal workflow is:
sam validate
sam build
sam deploy

The first deploy can be run interactively if a different stack name, region, model, or CORS origin is needed:
sam deploy --guided

The template defaults to the  amazon.nova-lite-v1:0  Bedrock model in  us-east-1 . Bedrock model access must be enabled for the account and region before asking ChangeLens to analyze a change. If the model is unavailable, deterministic fallback analysis still records the change.
After deployment, get the browser URL with:
aws cloudformation describe-stacks \
--stack-name changelens \
--query "Stacks[0].Outputs[?OutputKey=='ChangeLensUrl'].OutputValue" \
--output text

The deployed Function URL serves both the dashboard and routes such as  GET /api/monitors  and  POST /api/monitors/{monitorId}/check .

A practical MVP boundary

This first version is intentionally focused on public, server-rendered pages. Some sites require JavaScript execution, authentication, or robots-policy review before their useful content exists in the initial HTML. Those cases need a browser worker or a site-specific connector and are outside this lightweight SAM deployment.
The demo Function URL is public and does not include user accounts. Before using it for private watchlists or a multi-user product, add authentication, per-user ownership keys, throttling, URL allow/deny controls, and a queue for larger fleets. The DynamoDB tables and S3 bucket use encryption and point-in-time recovery, and retained resources are protected from accidental stack deletion.

Why this makes a good agent showcase

ChangeLens is more than a scheduled scraper and more useful than a raw diff. It performs a complete autonomous loop:
configure once → check on schedule → detect → reason → remember → answer questions

The user does not need to revisit the source page looking for a changed sentence. They receive a compact explanation tied to their own monitoring goal. That is the difference between knowing that a page changed and understanding what changed for you.
@gocools @muna
#AWSChallenge #AWS #Application #AWSLAMBDA #AWSSERVERLESS
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