AWS Architecture Diagrams with MCP
Generate professional, best-practice AWS architecture diagrams from plain-English prompts — using Kiro CLI with the AWS Diagram MCP server and AWS Documentation MCP server. The agent reads AWS docs for best practices, then renders a diagram with the Python diagrams package and the official AWS icon set — in minutes instead of hours.
Prerequisites
- · An AWS account (an AWS Builder ID works for experimenting)
- · macOS, Linux, or Windows terminal access
- · Python 3.10+ and the ability to install CLI tools
1Install & sign in to Kiro CLI
Install Kiro CLI (standalone), then verify and log in:
kiro-cli --version # → kiro-cli x.x.x
kiro-cli login # choose AWS Builder ID to experiment2Install the MCP server dependencies
Install uv, Python, and GraphViz (the diagrams package renders through GraphViz):
pip install uv
uv python install 3.10
# then install GraphViz for your OS (brew install graphviz, apt-get install graphviz, …)3Register the MCP servers
Add both servers to ~/.kiro/settings/mcp.json. Kiro CLI auto-discovers them on start:
{
"mcpServers": {
"awslabs.aws-diagram-mcp-server": {
"command": "uvx",
"args": ["awslabs.aws-diagram-mcp-server"],
"env": { "FASTMCP_LOG_LEVEL": "ERROR" },
"autoApprove": [],
"disabled": false
},
"awslabs.aws-documentation-mcp-server": {
"command": "uvx",
"args": ["awslabs.aws-documentation-mcp-server@latest"],
"env": { "FASTMCP_LOG_LEVEL": "ERROR" },
"autoApprove": [],
"disabled": false
}
}
}4Verify the setup
Launch the chat, confirm the servers loaded, then generate a test diagram:
kiro-cli
/mcp # confirm both servers are initializedThen paste a prompt like:
Create a diagram showing an EC2 instance in a VPC connecting to an
external S3 bucket. Include VPC, subnets, Internet Gateway, Route Table,
Security Groups, and NACLs. Label everything concisely and mark all
resources as us-east-1. Check AWS documentation for best practices first.Kiro asks you to trust the tool — enter t. A PNG is saved to a generated-diagrams folder.
The MCP tools
When you send a prompt, the agent interprets the requirements, checks AWS docs for best practices, lists the needed icons, generates diagrams Python code, runs it, and returns the image — so you describe what you want, not how to draw it.
Copy-paste example prompts
Simple web application
Create a diagram for a simple web application with an Application Load Balancer, two EC2 instances, and an RDS database. Check the AWS documentation to ensure it adheres to AWS best practices before you create the diagram.
Three-tier architecture
Create a diagram for a three-tier web application with a presentation tier (ALB and CloudFront), application tier (ECS with Fargate), and data tier (Aurora PostgreSQL). Include a VPC with public and private subnets across multiple AZs.
Serverless application
Create a diagram for a serverless web application using API Gateway, Lambda, DynamoDB, and S3 for static hosting. Include Cognito for authentication and CloudFront for content delivery.
Data processing pipeline
Create a diagram for a data processing pipeline organized in clusters for ingestion, processing, storage, and analytics. Include Kinesis, Lambda, S3, Glue, and QuickSight.
Tips for clean diagrams
- ▹ Always ask it to check AWS documentation for best practices before drawing — that's what keeps the output well-architected.
- ▹ Ask for SVG output when you need crisp, scalable diagrams (PNG is the default).
- ▹ Group resources into clusters (VPC, subnets, AZs) and specify the region for accuracy.
- ▹ Iterate with follow-up prompts — "add a WAF in front", "split into two AZs" — instead of restarting.
Workflow adapted from the AWS Machine Learning Blog, “Build AWS architecture diagrams using Kiro CLI and MCP.” See the official AWS MCP servers and the AWS Architecture Icons.