Cloud infrastructure automation is powerful yet complex. We asked ourselves: What if an AI agent could understand architecture intent and write compliant AWS CloudFormation templates automatically? That idea became CloudFormationComposer — an AI-driven tool to simplify, standardize, and accelerate cloud deployments.

What it does

CloudFormationComposer uses Amazon Bedrock to:

Parse natural language requests into valid CloudFormation templates.

Reference company-specific rules and past templates from a Knowledge Base.

Generate secure, production-ready infrastructure code.

How we built it

Bedrock Agent + Knowledge Base + Lambda + S3 + API Gateway

Custom Lambda chunker splits templates by resource type (e.g., AWS::S3::Bucket).

Knowledge Base stores these chunks with metadata for retrieval.

Bedrock Agent uses this structured context to reason and generate compliant templates.

Exposed publicly via API Gateway, no frontend required.

Challenges

IAM + JSON structure preservation + Bedrock ingestion events

Understanding contentBatches and Bedrock’s transformation event model.

Balancing chunk size and preserving structure during embedding.

Debugging IAM permission issues (aws-marketplace:ViewSubscriptions).

Accomplishments

End-to-end AI agent that generates and validates CloudFormation templates.

Reusable custom chunking Lambda for structured data ingestion.

Fully serverless deployment — zero custom frontend.

What we learned

Deep dive into Bedrock Agent architecture and KB ingestion pipeline.

Importance of hierarchical embeddings for JSON/YAML understanding.

How to debug cross-service orchestration in Bedrock.

What’s next

Integrate policy compliance checks (Config, Security Hub).

Support for Terraform/CDK formats.

Multi-agent collaboration: generate → validate → deploy.

Built With

Share this project:

Updates