Well-Architected Infrastructure as Code (IaC) Analyzer is a project that demonstrates how generative AI can be used to evaluate infrastructure code for alignment with best practices.
It features a modern web application built with React and AWS Cloudscape Design System, allowing users to upload IaC documents (e.g., AWS CloudFormation, Terraform, or AWS CDK templates), complete IaC projects (multiple files or zip archives), or architecture diagrams for assessment. The application leverages Amazon Bedrock to analyze the infrastructure against AWS Well-Architected best practices. These best practices are sourced from AWS Well-Architected whitepapers and synchronized with the Amazon Bedrock knowledge base.
This tool provides users with insights into how well their infrastructure code aligns with or deviates from established AWS best practices, offering suggestions for improving cloud architecture designs. Users can also upload supporting documents to provide additional context for more accurate analysis results. For architecture diagrams, it can even generate corresponding IaC templates following AWS best practices.
Additionally, an interactive Analyzer Assistant chatbot enables users to ask questions, seek clarification, and receive personalized guidance about analysis results and Well-Architected best practices.
- NEW ** Language Localization Support:
- Select your preferred language from the Output Language in Optional Settings menu
- Currently supports English, Japanese and Spanish
- Language selection affects analysis results, recommendations, and detailed explanations
- Consistent localization across all file types (CloudFormation, Terraform, CDK, PDF documents, and architecture diagrams)
- Interested in adding a new language? Check our localization guide for detailed instructions
- NEW ** Interactive Analyzer Assistant chatbot:
- Ask questions about analysis results
- Get detailed explanations of Well-Architected best practices
- Receive personalized guidance for implementation
- View conversation history with markdown support
- Download or delete chat histories for each analysis
- NEW ** Multi-lens support:
- Analyze infrastructure against specialized Well-Architected lenses
- Support for domain-specific lenses including Serverless, IoT, SaaS, Machine Learning, and more
- Get tailored recommendations specific to your workload type
- Switch between different lenses for comprehensive analysis
Expand to see the list of supported AWS Official Lenses:
- AWS Well-Architected Framework (core framework)
- Industry Lenses:
- Financial Services Industry
- Healthcare Industry
- Government
- Mergers and Acquisitions
- Technology Lenses:
- Generative AI
- Serverless Applications
- Machine Learning
- IoT (Internet of Things)
- SaaS (Software as a Service)
- Data Analytics
- Container Build
- DevOps
- Migration
- Connected Mobility
- SAP
- Upload and analyze Infrastructure as Code templates:
- CloudFormation (YAML/JSON)
- Terraform (.tf)
- AWS CDK (in any supported language)
- Upload and analyze architecture diagrams:
- PNG format
- JPEG/JPG format
- Analyze complete IaC projects:
- Multiple files at once
- ZIP archives containing infrastructure code
- Upload and analyze architectural documentation in PDF format:
- PDF documents (up to 5 files, max 4.5MB each)
- Only flowing text will be extracted from the PDF, embedded images will not be included.
- As of May 2025, Bedrock InvokeModel and Converse APIs does not support extracting embedded images from the PDF. This will be updated once supported.
- Add supporting documents (PDF, TXT, PNG, JPEG) to provide additional context for analysis
- Generate IaC templates from architecture diagrams
- Real-time analysis against Well-Architected best practices
- Integration with AWS Well-Architected Tool
- Export analysis results and recommendations
You have three options for deploying this solution:
- Option 1: Using a CloudFormation Deployment Stack (Recommended)
- Option 2: Using a Deployment Script
- Option 3: Manual Deployment
This option uses AWS CloudFormation to create a temporary deployment environment to deploy the Well-Architected IaC Analyzer solution. This approach doesn't require any tools to be installed on your local machine.
You must enable AWS Bedrock Model Access to the following LLM models in your AWS region:
- Titan Text Embeddings V2
- Claude 3.5 Sonnet v2 (default) or *NEW* Claude 3.7 Sonnet with extended thinking
- To enable these models, follow the instructions here.
-
Download the CloudFormation template: iac-analyzer-deployment-stack.yaml
-
Open the AWS CloudFormation console:
- Make sure you are in the same AWS region where you enabled access to the LLM models
-
On the "Create stack" page:
- Select "Upload a template file" and upload the
iac-analyzer-deployment-stack.yaml
template - Choose "Next"
- Select "Upload a template file" and upload the
-
On the "Specify stack details" page. Enter or change the stack name, then:
-
Change the stack parameters as needed. Check the CloudFormation Configuration Parameters section below for details
-
Security Note: By default, the stack deploys with a Public Application Load Balancer (internet-facing) without authentication enabled. It's strongly recommended to enable authentication to properly secure your internet-facing application.
-
Model Selection Note: The tool currently defaults to Claude 3.5 Sonnet V2. If you want to use Claude 3.7 Sonnet, you'll need to explicitly add the model ID in the stack "Amazon Bedrock Model ID" configuration parameter (e.g., for US regions:
us.anthropic.claude-3-7-sonnet-20250219-v1:0
). Please note that Claude 3.7 Sonnet is not available in all AWS regions, so verify availability in your region before deployment.
-
-
Choose "Next" until reaching the "Review" page and choose "Submit".
-
The deployment process typically takes 15-20 minutes.
Once complete, you'll find a new CloudFormation stack named WA-IaC-Analyzer-{region}-GenAIStack containing all the deployed resources for this solution. Find the application URL in the stack outputs:
- In the CloudFormation console, navigate to the Outputs tab of the stack named WA-IaC-Analyzer-{region}-GenAIStack
- Look for the FrontendURL value
-
If you enabled authentication with a custom domain:
- Create a DNS record (CNAME or Alias) pointing to the ALB domain name
-
If you created a new Cognito user pool:
- Navigate to the Amazon Cognito console
- Find the user pool created by the stack (named "WAAnalyzerUserPool")
- Add users who should have access to the application
-
Access your deployed application using the URL from the CloudFormation outputs (or your CNAME or Alias pointing to the ALB)