
Well-Architected Infrastructure as Code (IaC) Analyzer is a sample 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.
Note: This is a sample project, for non-production usage. You should work with your security and legal teams to meet your organizational security, regulatory and compliance requirements before deployment
Filter the analysis by Criticality, Complexity, or Priority to focus remediation planning, and export all fields to CSV
NEW 🧠 Enhanced AI Capabilities with Latest Anthropic Models:
1M token context window natively supported by Claude Fable 5, Claude Opus 4.8, Claude Opus 4.7, Claude Opus 4.6, and Claude Sonnet 4.6 models, enabling analysis of much larger IaC projects and architectural documentation in a single pass
🚀 Accelerated Analysis with Parallel Processing:
Default adjustable batch size configuration (between 1-12) balances speed and API throttling risk
💰 Cost-Optimized Vector Storage with Amazon S3 Vectors:
Expand to see the list of supported AWS Official Lenses:





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.
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:
iac-analyzer-deployment-stack.yaml templateChoose "Next"
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) with authentication enabled. For maximum security, we strongly recommend keeping authentication enabled for internet-facing deployments. If you disable authentication, your application will be publicly accessible without any security controls.
Model Selection Note: The tool currently defaults to Claude Sonnet 4.6. If you want to use a different model (E.g. Claude Fable 5, Claude Opus 4.8, or Claude Opus 4.7), you'll need to explicitly add the model ID in the stack "Amazon Bedrock Model ID" configuration parameter. Please note that not all models are available in all AWS regions, so verify availability in your region before deployment.
Geographic and Global Cross-Region Inference Note: The default Claude Sonnet 4.6 model ID uses a GLOBAL cross-Region inference profile (global.anthropic.claude-sonnet-4-6), which routes requests to any supported AWS commercial Region worldwide for optimal performance and cost savings. If your organization has data residency or compliance requirements, consider using a GEOGRAPHIC inference profile instead (e.g., "us." or "eu." prefix). For more information visit the documentation Choosing between Geographic and Global cross-Region inference
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
Create a DNS record (CNAME or Alias) pointing to the ALB domain name
If you created a new Cognito user pool:
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)
If you encounter issues during deployment, you can check the deployment logs in CloudWatch:
iac-deployment-logs-<region>-<unique-id>{instance_id}-user-data: Contains deployment instance initialization and setup logs{instance_id}-deploy: Contains the complete Well-Architected IaC Analyzer deployment logsYou can also find a direct link to these logs in the Outputs tab of your CloudFormation deployment stack.
Expand this section for instructions using the deployment script:
The following tools must be installed on your local machine:
Note: If you would like to change the default Load Balancer scheme, AI model or authentication options, check the Configuration Options For Manual Deployments section first before deploying.
git clone https://github.com/aws-samples/well-architected-iac-analyzer.git
cd well-architected-iac-analyzer
chmod +x deploy-wa-analyzer.sh
# Deploy using Docker
./deploy-wa-analyzer.sh -r us-west-2 -c docker
# Or deploy using Finch
./deploy-wa-analyzer.sh -r us-west-2 -c finch
The script will automatically: - Check for prerequisites - Set up the Python virtual environment - Install all dependencies - Deploy the CDK stack - Provide post-deployment information
After successful deployment, you can find the Application Load Balancer (ALB) DNS name in:
1. The outputs of the deploy-wa-analyzer.sh script
2. The outputs section of the CloudFormation stack named WA-IaC-Analyzer-{region}-GenAIStack in the AWS Console
If you prefer to manually deploy step by step, expand this section for more instructions:
$ claude mcp add well-architected-iac-analyzer \
-- python -m otcore.mcp_server <graph>