MCPcopy Create free account
hub / github.com/aws-samples/well-architected-iac-analyzer

github.com/aws-samples/well-architected-iac-analyzer @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
568 symbols 1,241 edges 85 files ⚖ MIT 53 documented · 9% ● updated 17d ago★ 5029 open issues

Browse by type

⨍ Functions 421◇ Types & classes 147
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Well-Architected IaC (Infrastructure as Code) Analyzer

[!IMPORTANT] 📢 Introducing the AWS Well-Architected Agent (Public Preview)

On October 1, 2026, AWS announced the AWS Well-Architected Agent, now available in public preview: an AI-powered AWS service that continuously analyzes your AWS environment and delivers personalized, prioritized recommendations across cost, security, performance, and resilience.

The AWS Well-Architected Agent covers the core of what this open-source IaC Analyzer does, including on-demand architecture reviews, and goes well beyond it:

  • Ongoing analysis of your live AWS environment across your AWS accounts and commercial AWS Regions
  • Recommendations at the resource, application, and architecture levels, prioritized against the business goals you define
  • Cross-pillar impact and trade-off analysis for each recommendation
  • Ready-to-deploy remediation, such as updated IaC code, AWS CLI commands, and guided console walkthroughs
  • Builds on findings from existing AWS optimization services

We encourage you to try the AWS Well-Architected Agent from the AWS Well-Architected console, or reach out to your AWS account team to learn more.

What this means for this project: the Well-Architected IaC Analyzer will continue to be maintained, mainly for security patching. We encourage users to try the AWS Well-Architected Agent.

Learn more: - What's New: AWS Well-Architected Agent (Preview) - AWS News Blog: Announcing AWS Well-Architected Agent (Preview) - AWS Documentation: What is AWS Well-Architected Agent (preview)?

solutions_diagram

Description

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

Features

  • NEW 🎯 Prioritization Framework with Eisenhower Matrix:
  • Each Not Applied best practice is scored with Criticality (from Knowledge Base Risk Level), Complexity (remediation effort), and Priority (Immediate | Short-term | Long-term) derived via the Eisenhower Matrix
  • New Priorities tab visualizes every relevant, Not Applied best practice on an interactive Eisenhower-style matrix, plotted by Risk criticality (impact) and Implementation effort (complexity) across four quadrants: Quick wins, Major initiatives, Delegate, and Reconsider
  • Click any point on the matrix to open a details panel with the best practice's status reason, recommendation, and Criticality/Complexity/Priority reasons, or ask the Analyzer Assistant about it in one click
  • 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:

  • Full support for Claude Sonnet 5.5 (default), Claude Opus 5.5, Claude Fable 5.1, Claude Opus 5, Claude Sonnet 5, Claude Fable 5 and Claude Opus 4.8
  • Supported Claude models leverage Adaptive Thinking for complex reasoning and analysis
  • 1M token context window natively supported by Claude Sonnet 5.5, Claude Opus 5.5, Claude Fable 5.1, Claude Opus 5, Claude Sonnet 5, Claude Fable 5, and Claude Opus 4.8, enabling analysis of much larger IaC projects and architectural documentation in a single pass
  • Switch models at deployment time via the ModelId CloudFormation parameter or config.ini (e.g. global.anthropic.claude-sonnet-5-5 (default), global.anthropic.claude-opus-5-5, global.anthropic.claude-fable-5-1, global.anthropic.claude-opus-5)

  • 🚀 Accelerated Analysis with Parallel Processing:

  • Configurable batch size controls how many Well-Architected (or selected Lens) questions are processed in parallel
  • Complete full framework review up to 80% faster compared per-question sequential processing
  • Default adjustable batch size configuration (between 1-30) balances speed and API throttling risk

  • 💰 Cost-Optimized Vector Storage with Amazon S3 Vectors:

  • S3 Vectors is the default vector store for the Bedrock Knowledge Base
  • Achieve up to 80% cost reduction compared to OpenSearch Serverless while maintaining sub-second query performance
  • OpenSearch Serverless remains available as an option for deployment

  • 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)
  • With the recent "Citations API and PDF support for Claude models", the analyzer is now able to analyze text, charts and visuals (e.g. embedded images and diagrams) from the PDF documents.
  • 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
  • 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
  • Language Localization Support:
  • Select your preferred language from the Output Language in Optional Settings menu
  • Support for English, Japanese, Korean, Brazilian Portuguese, Spanish and French
  • Language selection affects analysis results, recommendations, and detailed explanations
  • Consistent localization across all file types (CloudFormation, Terraform, CDK, PDF documents, and architecture diagrams)
  • 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
  • Custom Lenses support:
  • Extend analysis beyond AWS Official Lenses with your organization's own Custom Lenses
  • Define custom pillars, questions, and best practices specific to your security policies, compliance requirements, or internal standards
  • Integrate custom lens documentation (PDF) with the Amazon Bedrock Knowledge Base for AI-powered analysis
  • See the Custom Lenses Guide for step-by-step instructions

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

wa_aic_analyzer_screenshot_main

wa_aic_analyzer_screenshot_priorities

wa_aic_analyzer_screenshot_results

wa_aic_analyzer_screenshot_chat

wa_aic_analyzer_screenshot_template_generation

Installation and Deployment

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

Option 1: Using a CloudFormation Deployment Stack (Recommended)

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.

Deployment Steps

  1. Download the CloudFormation template: iac-analyzer-deployment-stack.yaml

  2. Open the AWS CloudFormation console:

  3. Make sure you are in the same AWS region where you enabled access to the LLM models

  4. On the "Create stack" page:

  5. Select "Upload a template file" and upload the iac-analyzer-deployment-stack.yaml template
  6. Choose "Next"

  7. On the "Specify stack details" page. Enter or change the stack name, then:

  8. 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 5.5. If you want to use a different model (E.g. Claude Opus 5.5, Claude Sonnet 5, Claude Fable 5.1, Claude Opus 5, Claude Fable 5 or Claude Opus 4.8), 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. Claude Fable 5.1 is an Anthropic Covered Model: your AWS account must first opt in to AWS review by setting the Amazon Bedrock data retention mode to aws_review (see Amazon Bedrock abuse detection), and it is offered through the us. geographic and global. inference profiles only.

    • Geographic and Global Cross-Region Inference Note: The default Claude Sonnet 5.5 model ID uses a GLOBAL cross-Region inference profile (global.anthropic.claude-sonnet-5-5), 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

  9. 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

Post-Deployment Steps

  1. If you enabled authentication with a custom domain:
  2. Create a DNS record (CNAME or Alias) pointing to the ALB domain name

  3. If you created a new Cognito user pool:

  4. Navigate to the Amazon Cognito console
  5. Find the user pool created by the stack (named "WAAnalyzerUserPool")
  6. Add users who should have access to the application

  7. Access your deployed application using the URL from the CloudFormation outputs (or your CNAME

Extension points exported contracts — how you extend this code

browse all types & interfaces →

Core symbols most depended-on inside this repo

browse all functions →

Shape

Function 251
Method 170
Interface 92
Class 50
Enum 5

Languages

TypeScript94%
Python6%

Modules by API surface

ecs_fargate_app/backend/src/modules/analyzer/analyzer.service.ts53 symbols
ecs_fargate_app/backend/src/modules/storage/storage.service.ts30 symbols
ecs_fargate_app/frontend/src/types/index.ts23 symbols
ecs_fargate_app/lambda_kb_synchronizer/kb_synchronizer.py19 symbols
ecs_fargate_app/frontend/src/services/api.ts19 symbols
ecs_fargate_app/frontend/src/components/utils/priority-matrix.ts19 symbols
ecs_fargate_app/frontend/src/components/WellArchitectedAnalyzer.tsx19 symbols
ecs_fargate_app/backend/src/modules/storage/storage.controller.ts19 symbols
ecs_fargate_app/frontend/src/components/PrioritiesView.tsx16 symbols
ecs_fargate_app/backend/src/shared/utils/project-packer.ts16 symbols
ecs_fargate_app/frontend/src/components/WorkSideNavigation.tsx15 symbols
ecs_fargate_app/backend/src/modules/well-architected/well-architected.service.ts15 symbols

For agents

$ claude mcp add well-architected-iac-analyzer \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page