AWS Builder Center

Weekend Showcase Challenge: CloudSentry AI

An autonomous, serverless multi-agent IaC review platform that statically audits Terraform and AWS CloudFormation templates for security vulnerabilities and Well-Architected cost optimizations using Amazon Bedrock, AWS Lambda, and AWS Amplify.

Vision & What It Does

As modern cloud engineering transitions entirely toward Infrastructure-as-Code (IaC), misconfigurations represent one of the largest attack vectors and cost drains in cloud environments. Critical security oversights—such as open ingress security groups ( 0.0.0.0/0 ), wildcard IAM administrative policies ( Action: * ), unencrypted storage, and oversized compute instances—frequently slip through pull requests into production. Traditional static linters often lack context, while comprehensive manual security audits introduce severe pipeline bottlenecks.
CloudSentry AI solves this by delivering an autonomous, multi-agent pre-deployment review platform. Developers submit their Terraform ( .tf ) or AWS CloudFormation ( .yaml / .json ) files via a clean web interface to receive instantaneous, dual-perspective feedback:
  • The Security Sentinel (Agent 1): Scans for attack surfaces, unencrypted datastores, public S3 bucket ACLs, and overly permissive IAM definitions.
  • The Cost & Architecture Advisor (Agent 2): Identifies deviations from the AWS Well-Architected Framework, flagging unattached storage volumes, absent S3 lifecycle policies, and missing auto-scaling policies.
The findings are synthesized into an interactive severity meter with actionable, color-coded remediation code snippets.

How I Built It: Process, Key Decisions & Challenges

My core design principle was building a production-grade utility with a strict zero-idle-cost serverless footprint.
The build began by orchestrating dual-agent workflows in Python 3.12 using AWS Lambda. A pivotal design decision was selecting Amazon Nova Micro via Amazon Bedrock as the core reasoning engine. Nova Micro provided the exact blend of low latency, precision, and cost-efficiency necessary to keep feedback loops near instantaneous.
The primary engineering challenge involved output determinism. Large Language Models inherently generate conversational text, whereas the frontend interface required structured data to render separate finding cards, severity indicators, and code drawers. I addressed this by designing rigid system prompts enforcing standard bracketed tokens (such as  [CRITICAL] ,  [HIGH] ,  [MEDIUM] , and  [LOW] ). On the client side, I built a custom JavaScript parser that intercepts these markers, categorizes their severity ratings, calculates proportion metrics dynamically, and neatly encapsulates remediation code within collapsible drawers.

AWS Services & Architecture Overview

CloudSentry AI operates on a 100% serverless, decoupled architecture utilizing six core AWS services:
  • AWS Amplify Hosting: Delivers the Tailwind CSS dashboard globally over a CDN with automated continuous deployment and HTTPS.
  • Amazon API Gateway: Exposes a lightweight, public HTTP REST endpoint configured with CORS handling to route payloads securely.
  • AWS Lambda: Orchestrates asynchronous parallel agent dispatches, parses Markdown output, and coordinates database writes.
  • Amazon Bedrock: Serves foundation model intelligence ( amazon.nova-micro-v1:0 ) across isolated security and cost reviewer personas.
  • Amazon DynamoDB: Stores structured scan metadata, timestamps, template formats, and execution states.
  • Amazon S3: Persists complete, immutable audit reports in Markdown format for auditing history.

What I Learned Across the Summer

This summer has been transformative in advancing my technical capabilities from isolated computing concepts to building end-to-end cloud applications. After earning certifications in Terraform and Docker earlier in the summer, the Summer Build Series pushed me to connect declarative infrastructure with applied AI orchestration.
Working with Amazon Bedrock taught me how to decouple system prompts to enforce strict persona separation, handle API error boundaries, and manage asynchronous serverless lifecycles. I learned that practical DevSecOps is about providing developers with immediate, actionable remediation without adding friction to their deployment workflows.

Project Timeline

  • Milestone 1 (Ideation & Prompt Design): Architected the multi-agent persona isolation strategy and tested Bedrock prompt templates.
  • Milestone 2 (Serverless Backend & Persistence): Configured AWS Lambda, Amazon API Gateway, DynamoDB tables, and S3 artifact buckets.
  • Milestone 3 (Frontend Engineering & Parser): Built the single-page responsive UI with custom Markdown token parsing and severity meters.
  • Milestone 4 (CI/CD Deployment & Validation): Integrated GitHub repository continuous deployment through AWS Amplify Hosting and executed automated smoke test suites.

Links & Community Inspiration

  • Community Inspiration: Special thanks to  @BenFowler  and the broader AWS Builder community for sharing insights on agentic design patterns and inspiring the dual-agent architecture behind CloudSentry.
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