AWS Builder Center
Weekend Creative Agent Challenge: ArchPulse

Weekend Creative Agent Challenge: ArchPulse

ArchPulse

Cloud AI Architect(AWS/Azure/GCP)

WS Builder Center Article: ArchPulse — Always-On AI Architecture



ArchPulse — Always-On AI Architecture Copilot An autonomous agent that reviews cloud architecture every morning and delivers actionable intelligence briefs.



At a Glance

Attribute
Detail
What it is
ArchPulse — autonomous architecture intelligence agent
Primary output
Daily Architecture Intelligence Brief (JSON → DynamoDB → email + dashboard)
AI engine
Amazon Bedrock — Nova Lite (Converse API, tool-use loop)
Compute
AWS Lambda (Python 3.13, ARM64) + EventBridge Scheduler
Infrastructure
AWS SAM — 15 resources (DynamoDB, S3, SES, SNS, SQS DLQ, API Gateway HTTP API)
Autonomous flow
Scheduled daily 06:00 ET; no human trigger in primary path
Idempotency
Conditional DynamoDB write guards against concurrent runs
Data sources
Deterministic: stored project metadata; AI-generated: recommendations
Cost
Fully Free-Tier eligible (DynamoDB on-demand, Lambda within free tier)
Security
Least-privilege IAM per function; SES sender constraint; HTML escaping



Vision & What It Does

The problem: Architecture review is reactive. Technical debt, reliability risks, and cost inefficiencies accumulate quietly between rare moments of deliberate review. By the time an architect looks, weeks have passed and the backlog is long.
The solution: ArchPulse inverts the model. Every morning at 06:00 America/New_York, an autonomous agent wakes up, reviews the application's cloud architecture, and delivers an Architecture Intelligence Brief — a prioritised, reasoned summary that's waiting before the engineering day begins.
The brief is not a generic report. The agent:
  • Reasons across eight dimensions: architecture quality, reliability, security, cost efficiency, observability, scalability, maintainability, and operational resilience
  • Avoids repetition by reading prior briefs and building on yesterday's recommendations instead of repeating them
  • Scores holistically — not just a number, but evidence-grounded: if data is limited, the agent scores conservatively and flags what needs validation
  • Prioritizes ruthlessly — one "today's focus" item, ranked by business impact (fault isolation beats marginal cost savings)
  • Delivers proof — architecture evolution diagrams (current vs. recommended), security/reliability/cost/observability insights, positive findings, and a "tomorrow focus" to drive continuity
The output is both stored and delivered: DynamoDB persists the brief (queryable, auditable), Amazon SES emails a polished HTML version, and a professional dashboard surfaces the latest brief with history. On failure, Amazon SNS alerts the administrator immediately; the SQS dead-letter queue preserves the failed event.



How You Built It

Design Principles

1. Grounding the agent in facts, not invention
The first draft let the model generate everything — temperatures, geography, risk assessments. Charming, but wrong. I moved critical facts into deterministic, tool-backed layers:
  • Architecture context — retrieved from DynamoDB (known issues, technical debt, prior recommendations)
  • Project metadata — immutable (project name, environment, components, signals)
  • Signals — if recorded for the project, the agent reasons over them; if absent, it says "requires_validation" instead of guessing
The model's job became: reason over facts I give you; surface unknowns; propose next steps.
2. Structured output as a contract, not a hope
I learned this the hard way. Early attempts returned JSON wrapped in Markdown, prose spilling outside the object, escaped quotes. The fix was non-negotiable:
  • System prompt includes an exact JSON schema example
  • Parser is defensive: strips code fences, tolerates prose wrap, extracts  {...}  as the outer object
  • Validation checks required keys immediately; if parsing fails, one low-temp retry
  • Fallback — if retry fails, the brief fails (better to alert than hallucinate)
3. Idempotency by design, not luck
EventBridge Scheduler retries twice on failure. A retry at 06:01 must not re-invoke Bedrock or re-send email if the 06:00 run succeeded. The answer: conditional DynamoDB write.
python
ConditionExpression="attribute_not_exists(SK) OR #s <> :done"
ExpressionAttributeValues={":done": "COMPLETED"}
If today's brief is already  COMPLETED , the write fails gracefully and we return the existing brief. Retries are idempotent.
4. Operational resilience for an unattended agent
Autonomous systems fail silently if you're not careful. ArchPulse has layered safety:
  • SQS dead-letter queue — failed Lambda invocations are retained for 14 days
  • CloudWatch alarm — fires on  ArchPulseRunFailure  metric
  • Amazon SNS — alarm publishes to admin's email immediately
  • X-Ray tracing — every run is traced end-to-end so debugging is possible
  • Metrics —  ArchPulseRunSuccess ,  EmailDeliverySuccess ,  BedrockInvocationFailure ,  IdempotentHit  — the operational heartbeat

Architecture Overview

EventBridge Scheduler (06:00 ET daily, retry ×2)
↓
AWS Lambda (Python 3.13, ARM64)
├─ Load config (SSM Parameter Store, cached)
├─ Idempotency check: briefDate + projectId
├─ Load project + recent briefs (DynamoDB)
├─ Build context (ContextService: architecture, issues, signals, changes)
├─ Invoke Bedrock Nova Lite (Converse, tool-use loop, 8 tools, max 8 turns)
│ └─ Tools: get_project_architecture, get_open_issues, get_previous_recommendations,
│ get_security_signals, get_reliability_signals, get_cost_signals,
│ get_observability_signals, get_recent_changes
├─ Parse strict JSON response (defensive parser, schema validation)
├─ Deterministic field overrides (briefDate, status, emailSubject, duration)
├─ Conditional DynamoDB write (idempotency guard)
├─ Render + send HTML email (SES)
├─ Publish rendered brief to S3 (latest.json, date.json)
└─ Emit metrics (CloudWatch EMF) + trace (X-Ray)

Failure path:
└─ SNS alert → admin email
└─ SQS DLQ → event retained 14 days
└─ CloudWatch alarm → ArchPulseRunFailure metric

Read-only Dashboard API:
GET /briefs/latest → Lambda → DynamoDB
GET /briefs/history → Lambda → DynamoDB (30 briefs, summary fields)
GET /health → Lambda → 200 OK

Dashboard UI:
Static HTML + CSS + JS (no framework)
├─ Navy sidebar + white cards (AWS-orange accents)
├─ Telemetry-mono signature: all machine-generated values in JetBrains Mono
├─ Health ring (conic gradient, 0–100)
├─ Dimension instruments (architecture, security, reliability, cost, observability)
├─ Autonomous execution trace (6-step diagram)
├─ Today's focus (title + category + priority + description + business impact)
├─ Architecture evolution (current → recommended → reason)
├─ Timeline (today's rec + 3 prior days)
├─ Run history table (date, status, score, model, email delivery)
├─ Email delivery card (SES metadata)
├─ Insights & safety net (4 operational controls)
└─ Services grid (10 AWS services used)
Sample fallback: dashboard works offline with bundled sample data
API fallback: no apiBaseUrl? render sample. apiBaseUrl 404? render sample + banner.

AWS Services & Decisions

Service
Why
Cost
EventBridge Scheduler
Triggers the agent daily at 06:00 ET; retries ×2. No human button.
Free tier (first 14 invocations free)
AWS Lambda
Single function runs the entire agent + API. Arm64 (cheaper). Python 3.13.
Free tier (1M requests, 400k GB-seconds)
Amazon Bedrock
Nova Lite model via inference profile us.amazon.nova-lite-v1:0 (cross-region). Converse API + tool-use loop.
~$0.30 per million input tokens; ~$1.20 per million output tokens
Amazon DynamoDB
Single-table: PROJECT#id / META item + BRIEF#date items. On-demand billing (no provisioned capacity).
Free tier (25 write units, 25 read units); beyond that ~$1.25 per million write units
Amazon S3
Static renders (latest.json, dated briefs). All public access blocked. AES256 encryption.
Free tier (5 GB storage)
Amazon SES
HTML + text email delivery. Only from verified sender; scoped via IAM condition.
Free tier (200 messages/day, if sending only)
Amazon SNS
Failure notifications to admin. Publishes on CloudWatch alarm.
Free tier (1,000 notifications)
Amazon SQS
Dead-letter queue for failed Lambda invocations. 14-day retention.
Free tier (1M requests)
Systems Manager Parameter Store
Runtime config: project-id, model-id, ses-sender, ses-recipient, dashboard-url. Cached per container.
Free tier (standard parameters)
Amazon CloudWatch
Structured logs (Powertools Logger). EMF metrics (namespace ArchPulse). Alarm on RunFailure → SNS.
Free tier (5 GB logs, 10k metrics)
AWS X-Ray
Tracing on both Lambda functions. Full request-to-response visibility.
Free tier (100k traces recorded per month)
API Gateway (HTTP API)
Lightweight REST endpoint (GET /briefs/latest, /history, /health).
Free tier (1M HTTP API calls)
AWS IAM
Least-privilege roles per function: agent can only invoke Nova Lite model ARNs; API is read-only DynamoDB.
No additional cost
AWS SAM
Infrastructure-as-code template (15 resources). Deploys via CloudFormation.
No additional cost

Key Challenges & Solutions

Challenge 1: JSON parsing reliability LLMs are chatty; they wrap JSON in Markdown, add prose, use smart quotes. Solution: defensive parser that strips fences, finds the outer  {...} , validates required keys, and retries once at low temperature on failure.
Challenge 2: Bedrock model access has two gates IAM permission ( bedrock:InvokeModel ) is necessary but not sufficient. The Bedrock console also requires "Model access enabled" for Nova Lite. This is easy to miss. Solution: document it front-and-center in the README; include Bedrock access troubleshooting in the deployment guide.
Challenge 3: Avoiding recommendation repetition If the agent suggests "add SQS" today, it shouldn't suggest it again tomorrow. Solution: load previous briefs and the model's own  get_previous_recommendations  tool. The system prompt explicitly instructs: "Build on prior recommendations when appropriate" with an example.
Challenge 4: Ensuring the brief doesn't lose context in retries If an email send fails, the brief is still stored. If a retry happens, we must not lose the brief just because email failed once. Solution: store the brief first (idempotent write), then send email. Email failure is non-fatal; it triggers metrics + SNS but doesn't lose the brief.
Challenge 5: Distinguishing "no recorded data" from "no opinion" If a security signal hasn't been recorded for the project, the agent shouldn't invent one. Solution: signal tools return  {"signals": [], "note": "requires_validation: no recorded signals"}  so the model knows the absence is real.


Application Screenshots










AWS Service Screenshots


















AWS Service
Resource name
CloudFormation
Stack: archpulse
Lambda
archpulse-agent
Lambda
archpulse-api
API Gateway
API ID: m3gfifa3y1
DynamoDB
archpulse-Table-1P6JWGOJ7W73C
S3
archpulse-briefbucket-ndmlhgp3hr5h
S3 Static Website
archpulse-dashboard-666036096223-us-east-1
EventBridge Scheduler
archpulse-daily
SQS
archpulse-AgentDLQ-nI9nNynZPVBk
SNS
archpulse-AlertTopic-VLbHr3XnbwEj
CloudWatch
Alarm: ArchPulse-RunFailure
CloudWatch Logs
/aws/lambda/archpulse-agent
CloudWatch Logs
/aws/lambda/archpulse-api
Systems Manager Parameter Store
/archpulse/project-id
Systems Manager Parameter Store
/archpulse/model-id
Systems Manager Parameter Store
/archpulse/ses-sender
Systems Manager Parameter Store
/archpulse/ses-recipient
Systems Manager Parameter Store
/archpulse/dashboard-url
Amazon Bedrock
Model: Amazon Nova Lite
Amazon SES
Verified identity: 
 parthi.qwicksoft@gmail.com 
IAM
archpulse-AgentFunctionRole-3aHgP8thVWnY
IAM
archpulse-SchedulerRole-*

Dashboard Overview

  • Sidebar with project name, next run, last run, cadence (06:00 ET daily)
  • Health ring (conic gradient, 0–100, animated on load)
  • Instruments — 5 dimension scores with day-over-day delta (up/down/flat)
  • Execution trace — 6-step flow showing EventBridge → Lambda → Context → Bedrock → DynamoDB → SES
  • Today's focus — card with title, priority (HIGH/MEDIUM/LOW), category, description, business impact
  • Architecture evolution — current vs. recommended (visual flow diagram)
  • Timeline — today's recommendation + 3 prior days (today highlighted, earlier faded)

Run History & Delivery

  • Run history table — date, status (SUCCESS/DEGRADED/FAILED), score, model, email delivery (DELIVERED/FAILED)
  • Email delivery card — channel, recipient, sent timestamp, subject, SES message ID
  • AI insights — top 4 recommendations with category tags (security/reliability/cost/observability)
  • Safety net — 4 operational controls (SQS DLQ, CloudWatch alarm, SNS, X-Ray)

Services Grid

All 10 AWS services highlighted with icons and one-liner purposes.



What I Learned

1. Agents need real tools, not model opinions The biggest difference between a "neat demo" and a "genuinely useful tool" was grounding the agent in real data. Architecture context came from DynamoDB; weather came from APIs (in Wanderwise); signals came from recorded measurements. When the model reasons over facts instead of inventing them, you get trustworthy output.
2. Idempotency is a design pattern, not an afterthought The first version had no idempotency guard. A scheduled retry would re-run Bedrock and re-send email. Adding the conditional DynamoDB write ( attribute_not_exists OR status <> COMPLETED ) was a small line of code with massive operational impact. Now retries are free.
3. Failure must be loud A Lambda running unattended at 06:00 can fail silently if no one is watching. SQS DLQ + SNS alert + CloudWatch alarm means the admin knows immediately. Structured metrics mean you can graph failure trends.
4. Structured output is a design problem Hoping for clean JSON doesn't work. The answer is: exact schema in the prompt, defensive parsing, required-key validation, one retry, and clear fallback. This is table-stakes for production agents.
5. One Lambda + Function URL is a superb weekend stack No API Gateway fee, no database overhead, the whole app fits comfortably in Free Tier. For a once-daily scheduled agent + simple API, it's perfect.
6. Dashboard as a storytelling tool The brief is JSON, but the dashboard is the story. The ring, the timeline, the architecture evolution diagram — these tell the story of architectural health over time in a way a table never could.


AWS Resources Created:

Deployment & Usage

Prerequisites

  • AWS account (AWS Free Tier eligible)
  • AWS SAM CLI
  • Python 3.13
  • Bedrock model access — enable Nova Lite in the AWS console (IAM permission alone is insufficient)
  • Systems Manager Parameter Store — configuration is read at runtime

Deploy

bash
git clone https://github.com/parthi1914/archpulse
cd archpulse

sam build

sam deploy --guided \
--parameter-overrides \
ProjectId=cloud-platform \
ModelId=us.amazon.nova-lite-v1:0 \
SesSender=you@yourdomain.com \
SesRecipient=you@yourdomain.com \
DashboardUrl=https://your-dashboard-url
Save the outputs:  ApiBaseUrl ,  TableName ,  AlertTopicArn .

Seed the project

bash
python seed/seed.py --table <TableName>

Wire the dashboard

Edit  frontend/config.js :
js
window.ARCHPULSE_CONFIG = {
apiBaseUrl: "https://abc123.execute-api.us-east-1.amazonaws.com",
region: "us-east-1"
};
Host  frontend/  on S3 or open  frontend/index.html  locally (dashboard works offline with sample data).

Subscribe to failure alerts

bash
aws sns subscribe --topic-arn <AlertTopicArn> \
--protocol email \
--notification-endpoint you@yourdomain.com

Trigger a run

bash
aws lambda invoke --function-name archpulse-agent /dev/stdout



Application screenshot

Code & Repository

Live dashboard (after deployment): Hosted on your S3 or local; fronted by the Lambda API
Architecture briefs are generated fresh daily and stored in DynamoDB; previous briefs are queryable via  /briefs/history .



Disclaimers & Notes

  • Not a replacement for human architects. ArchPulse is advisory. Recommendations should be reviewed and tested before implementation.
  • Data sources. Architecture context is provided by the user (seeded in DynamoDB). Recommendations are AI-generated based on that context and should be validated.
  • Bedrock access. Requires both IAM  bedrock:InvokeModel  permission AND console model-access enablement for Nova Lite.
  • Free Tier. This stack fits comfortably in AWS Free Tier for modest usage (1 run/day, light dashboard traffic).



Hashtags & Metadata

 #agents   #AWS   #AmazonBedrock   #CloudArchitecture   #ServerlessArchitecture   #EventDriven   #Automation   #AWSBuilder   #NoSQL   #LambdaFunctions 
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