Create beautiful infrastructure diagrams from simple YAML
InfraSketch lets you create interactive, hierarchical cloud architecture diagrams using a simple YAML schema. Just describe your infrastructure and watch it come to life!
name: "My Architecture"
direction: LR # LR (left-right) or TB (top-bottom)
nodes:
- id: unique_id
type: aws.compute.EC2
label: "My Server"
connections:
- from: node_id_1
to: node_id_2
Nodes represent components in your architecture. Use the format provider.category.ClassName or just type the class name for autocomplete suggestions!
| Short Name | Full Path | Description |
|---|---|---|
ec2 |
aws.compute.EC2 |
AWS EC2 Instance |
lambda |
aws.compute.Lambda |
AWS Lambda Function |
rds |
aws.database.RDS |
AWS RDS Database |
s3 |
aws.storage.S3 |
AWS S3 Bucket |
nginx |
onprem.network.Nginx |
Nginx Web Server |
redis |
onprem.inmemory.Redis |
Redis Cache |
pod |
k8s.compute.Pod |
Kubernetes Pod |
Start typing a node name in the type: field and autocomplete will show suggestions with icons!
Group related nodes together using clusters:
nodes:
- id: vpc
type: cluster
label: "VPC"
children:
- id: web
type: ec2
label: "Web Server"
- id: db
type: rds
label: "Database"
You can customize the background color of clusters using the color property. A color picker will appear when you edit this field!
nodes:
- id: production
type: cluster
label: "Production"
color: "#E8F5E9" # Light green background
children:
- id: web
type: ec2
label: "Web Server"
- id: staging
type: cluster
label: "Staging"
color: "#FFF3E0" # Light orange background
children:
- id: staging_web
type: ec2
label: "Staging Web"
When you type in the color: field, a color picker will appear with preset colors and a native color selector!
Add detailed sub-diagrams to any node. Click on the node to explore!
nodes:
- id: web_server
type: ec2
label: "Web Server"
details:
name: "Web Server Details"
direction: TB
nodes:
- id: nginx
type: nginx
label: "Nginx"
- id: app
type: onprem.compute.Server
label: "App"
connections:
- from: nginx
to: app
Define how nodes connect to each other:
connections:
# Simple connection
- from: client
to: server
# With label
- from: server
to: database
label: "SQL"
# With styling
- from: app
to: cache
label: "Redis"
color: "red"
style: "dashed"
| Property | Description | Example |
|---|---|---|
from |
Source node ID | from: web |
to |
Target node ID | to: database |
label |
Connection label | label: "HTTPS" |
color |
Line color | color: "red" |
style |
Line style | style: "dashed" |
| Shortcut | Action |
|---|---|
| Ctrl + Enter | Render diagram |
| Ctrl + S | Download YAML |
| Tab | Insert 2 spaces |
| ↑ ↓ | Navigate autocomplete |
| Enter | Select autocomplete item |
| Esc | Close autocomplete |
Classic 3-tier architecture with users, web servers, and database.
Event-driven microservices with message queues and API gateway.
K8s cluster with pods, services, and ingress controller.
AWS Lambda functions with API Gateway and DynamoDB.
name: "E-Commerce Platform"
direction: LR
nodes:
- id: users
type: aws.general.Users
label: "Customers"
- id: cdn
type: aws.network.CloudFront
label: "CDN"
- id: api_cluster
type: cluster
label: "API Layer"
children:
- id: api
type: aws.compute.Lambda
label: "API Gateway"
details:
name: "API Details"
nodes:
- id: auth
type: aws.security.Cognito
label: "Auth"
- id: handler
type: aws.compute.Lambda
label: "Handler"
connections:
- from: auth
to: handler
- id: cache
type: aws.database.ElastiCache
label: "Redis Cache"
- id: db
type: aws.database.RDS
label: "PostgreSQL"
- id: storage
type: aws.storage.S3
label: "Assets"
connections:
- from: users
to: cdn
- from: cdn
to: api
- from: api
to: cache
label: "Cache"
- from: api
to: db
label: "Query"
- from: cdn
to: storage
style: "dashed"