
Weekend Agent Challenge: Always-On Cloud Security Triage Agent
An AWS watcher agent that runs on a schedule, reviews mock cloud security findings, triages them with Amazon Bedrock and Amazon Nova, stores structured results in DynamoDB, and writes Markdown security briefs to S3.
Why I Built This
Security alerts are only useful if someone has time to review, prioritize, and act on them. In production cloud environments, even small teams can quickly end up with a backlog of findings, warnings, and signals that are important but hard to process consistently.
For this weekend challenge, I built the Always-On Cloud Security Triage Agent: a personal AWS-powered watcher agent that wakes up on a schedule, reviews unresolved cloud security findings, generates triage recommendations, and stores a security brief so the result is ready when I come back.
The goal was not to build a full enterprise SOC platform. The goal was to build a focused, serverless agent that demonstrates one useful behavior well:
wake up → inspect findings → triage → store results → generate a report.
For this first version, the agent uses mock cloud security findings instead of live AWS Security Hub or Amazon GuardDuty data. This keeps the project reproducible for a weekend build while still showing the core pattern of an always-on cloud security workflow.

Agent Category
This project fits the Watcher category because the agent monitors a changing source of cloud security findings and surfaces the items that deserve attention.
What the Agent Does
The agent follows this workflow:
- Amazon EventBridge Scheduler wakes up the agent every 30 minutes.
- AWS Lambda runs the Python watcher logic.
- The Lambda function reads unresolved findings from Amazon DynamoDB.
- Each finding is schema-validated, normalized, and length-bounded before processing.
- The agent uses Amazon Bedrock with Amazon Nova Lite to generate a structured security triage recommendation.
- If Bedrock is disabled, unavailable, or returns invalid output, the agent can fall back to deterministic local triage logic.
- The finding is updated in DynamoDB with priority, likely issue, recommended action, escalation status, analyst summary, and source.
- A timestamped Markdown report is written to Amazon S3.
- Amazon CloudWatch Logs records structured execution events for observability.
The result is a small but complete always-on security workflow, the agent runs by itself, processes findings while I am away, and leaves behind a clear report.

Architecture
EventBridge Scheduler ↓AWS Lambda Agent ↓DynamoDB Findings Table ↓Amazon Bedrock / Nova Lite ↓DynamoDB Triage Updates ↓S3 Markdown Reports ↓CloudWatch LogsI chose this architecture because it matches the size of the project. It is not over-engineered, but it is also not just a local script. The agent is deployed as an AWS-native scheduled workflow using managed services.

AWS Services Used and Cost Estimate
The project uses a focused serverless architecture designed to stay lightweight while still reflecting patterns that could evolve into a real cloud security automation workflow.
Assumptions for the estimate:
- Region:
us-east-1
- 30-day month
- One scheduled execution every 30 minutes
- Approximately 1,440 scheduled runs per month
- AWS Lambda configured with 256 MB memory on ARM64
- Small Markdown reports stored in Amazon S3
- Bedrock is called only for findings with status
Service | Role in the project | Pricing model / Free Tier relevance | Expected cost for this demo |
|---|---|---|---|
Amazon EventBridge Scheduler | Invokes the watcher every 30 minutes | EventBridge Scheduler includes 14 million free invocations per month; pricing after that is $1.00 per million invocations. | $0.00 |
AWS Lambda | Runs the Python 3.12 agent | Lambda pricing includes request charges and compute duration; the free tier includes 1 million requests per month and 400,000 GB-seconds of compute. | $0.00 |
Amazon DynamoDB | Stores findings, status, and triage output | The project uses PAY_PER_REQUEST . DynamoDB request pricing is usage-based; the first 25 GB of table storage is included in the Free Tier for Standard tables. | Less than $0.01 |
Amazon Bedrock / Amazon Nova Lite | Generates structured security triage recommendations | Nova Lite is the main variable cost. Bedrock charges by input and output tokens. | About $0.00039 for the five sample findings |
Amazon S3 | Stores timestamped Markdown security reports | S3 charges for object storage and requests. This project stores only small Markdown files. | About $0.007/month before credits or Free Tier benefits |
Amazon CloudWatch Logs | Stores structured Lambda execution logs | CloudWatch Logs includes a free usage allowance for log ingestion and storage. This project emits very small structured logs. | $0.00 |
Terraform Community Edition | Deploys the infrastructure reproducibly | Local Terraform CLI usage is free. | $0.00 |
For the current mock-finding demonstration, the expected monthly cost is effectively $0.00 with eligible AWS Free Tier allowances or credits. Without Free Tier or credits, the expected cost is still only around $0.02–$0.05/month, because the workload is tiny.
The only meaningful variable cost is Bedrock. For example, if each finding used around 500 input tokens and 200 output tokens, then:
cost = input_tokens / 1,000,000 × $0.06 + output_tokens / 1,000,000 × $0.24Live Verification
After deploying the project, I seeded five mock cloud security findings into DynamoDB and invoked the Lambda function manually. The agent loaded all five findings, triaged each one using Amazon Bedrock, updated DynamoDB, and generated a Markdown report in S3.

The CloudWatch Logs screenshot shows the key execution events:
run_started findings_loaded count: 5 finding_triaged ... source: bedrock run_completed triaged_count: 5 rejected_count: 0 Also verified that the EventBridge Scheduler was enabled and restored to the final 30-minute cadence after testing. This proves the "always-on" part of the challenge: the agent can keep running without manual clicks.
Example Finding
One of the sample findings represents an S3 bucket with public read access:
{ "finding_id": "finding-s3-public-001", "title": "S3 bucket permits public read access", "severity": "CRITICAL", "resource_type": "AwsS3Bucket", "region": "us-east-1", "status": "NEW"}After processing, the agent updated the item with structured triage output.

The DynamoDB result includes:
status: TRIAGED priority: P1 escalation_needed: true source: bedrock recommended_action: revoke or restrict public access permissions triaged_at: timestamped completion This shows that the agent persisted both state and reasoning output, instead of only generating a temporary response.
Generated Report
Each run creates a Markdown report in S3 under a dated reports/ prefix.

The report includes a summary of processed findings, priority levels, escalation status, and concise recommended actions.
Security Design Decisions
Because this is a cloud security project, I wanted the implementation to follow basic security principles instead of only focusing on functionality.
Some of the security choices include:
- Least-privilege IAM permissions for the Lambda execution role.
- A separate Scheduler role that can invoke only the target Lambda function.
- S3 public access blocked for the reports bucket.
- S3 server-side encryption enabled.
- DynamoDB encryption at rest.
- DynamoDB point-in-time recovery enabled.
- No hardcoded AWS credentials.
- Environment variables used only for non-secret configuration.
- Input validation before findings are processed.
- Bounded prompt content before sending finding data to Bedrock.
- Model output validation before writing triage results.
- Structured logging without recording prompts, model responses, credentials, or secrets.
- Pinned Python dependencies.
The project also includes a lightweight mapping to the NIST Cybersecurity Framework:
- Detect: the agent identifies unresolved findings that require review.
- Respond: the agent recommends actions and marks findings that need escalation.
- Govern / Protect: the infrastructure uses least privilege, private storage, validation, and controlled data flow.
- Recover: generated reports create a simple review trail for follow-up.
From an OWASP serverless security perspective, the project focuses on event/input validation, secure secrets handling, dependency hygiene, and safe logging.
What I Learned
The main lesson was that state matters. Using DynamoDB statuses like
NEW , NEEDS_REVIEW , and TRIAGED made the agent behave like a workflow instead of a scheduled script that repeats the same work.Also learned that Lambda should not send raw data directly to the model. The function validates and limits each finding before sending it to Bedrock, then stores structured triage output instead of relying on a free-form response.
Repository
The full project is available here:
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article