aws-architecture-diagram
Generate AWS architecture diagrams in draw.io format. Activates when the user asks to create, generate, or build an architecture diagram, system diagram, or draw.io diagram for AWS services.
vidanov · 已有 AI 审核记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add vidanov/aws-architecture-diagram-skill --skill aws-architecture-diagram技能说明
name: aws-architecture-diagram description: Generate AWS architecture diagrams in draw.io format. Activates when the user asks to create, generate, or build an architecture diagram, system diagram, or draw.io diagram for AWS services.
Instructions
Generate a draw.io (.drawio) XML file representing an AWS architecture diagram.
Layout
- Left-to-right flow for data/request path
- UI/Frontend on the LEFT (users access from left side)
- Data sources / external systems on the RIGHT
- Use horizontal lanes for parallel paths (top lane, bottom lane)
- Minimum 220px horizontal spacing between icons (to leave room for edge labels)
- Minimum 250px vertical spacing between lanes (so vertical edges don't crowd)
- Secondary/auxiliary services (monitoring, DLQ, error paths) go BELOW the main flow with 280px+ vertical gap
Canvas
- Large canvas:
pageWidth="2400" pageHeight="1400"minimum - Set
dx="2800" dy="1600"for proper viewport - Always include a title block as the first element after the background:
<mxCell value="<b>Diagram Title</b><br>Author | Date | Version" style="text;html=1;align=left;verticalAlign=top;whiteSpace=wrap;rounded=0;fontSize=14;spacing=8;" vertex="1" parent="1">
<mxGeometry x="40" y="30" width="420" height="60" as="geometry" />
</mxCell>
Icon Style
- Icons are from draw.io's built-in
mxgraph.aws4stencil library — the official AWS Architecture Icons (https://aws.amazon.com/architecture/icons/, updated quarterly) - Icon size: 78x78px for main services, 65x65px for secondary
- Use
sketch=0;outlineConnect=0;on all icons - Use
strokeColor=#ffffffon all AWS service icons - MUST include
fillColor— without it, icons render as invisible/white in PNG export - Font size: 12px for labels
- Always include:
fontColor=#232F3E;verticalLabelPosition=bottom;verticalAlign=top;align=center;html=1;aspect=fixed;
fillColor by AWS service category:
| Category | fillColor | Services |
|---|---|---|
| Compute | #ED7100 | Lambda, EC2, ECS, EKS, Fargate |
| Networking | #8C4FFF | VPC, ELB, CloudFront, Route 53, API Gateway |
| Database | #C925D1 | RDS, DynamoDB, Aurora, ElastiCache |
| Storage | #3F8624 | S3, EFS, EBS |
| Security | #DD344C | IAM, Cognito, KMS, WAF |
| Integration | #E7157B | SQS, SNS, EventBridge, Step Functions |
| Analytics | #8C4FFF | Kinesis, Athena, Redshift |
| Management | #E7157B | CloudWatch, CloudTrail |
| AI/ML | #01A88D | Bedrock, SageMaker |
3D / Isometric Diagrams — use a different icon library
If the user asks for a 3D, isometric, or "AWS 3D" diagram, do NOT fake it by placing flat aws4 icons on hand-built platform/pedestal shapes. draw.io has a real, separate built-in library for this: mxgraph.aws3d.*.
- Load
references/aws-icons-3d.mdbefore picking any icon — it has the verified shape table, style prefix, sizes, and the nativeisometricEdgeStyleedge templates. - This library is a legacy pre-2019 icon set with much smaller coverage than
aws4(no API Gateway, ECS/EKS/Fargate, Step Functions, EventBridge, SNS, Aurora, CloudWatch, IAM, etc.). Check the gap table in that reference file before assuming an icon exists, and flag substitutions to the user rather than guessing a stencil name. - For generic hardware (clients, on-prem servers, racks, switches) with no AWS-specific icon, see
references/aws-icons-allied-telesis.md— a separate bundled isometric image library that fills that gap. - These icons are already 3D on their own — arrange them in an ascending isometric staircase (diagonal offsets between nodes), don't add fake platforms underneath.
- Use
edgeStyle=isometricEdgeStyle(withendArrow=blockoverride for reliable arrowheads) instead oforthogonalEdgeStylefor connectors.
Edge Style — CRITICAL FOR CLEAN DIAGRAMS
Base edge style (all edges):
edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeWidth=2;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;
Rules for edge labels:
- Keep labels SHORT (1-2 words max). Use icon labels for detail, not edge labels.
- On horizontal edges: position label ABOVE the line using
verticalAlign=bottom;in the edge style - On vertical edges: position label to the LEFT using
align=right;in the edge style - Always add
labelBackgroundColor=#F5F5F5;so labels don't overlap lines - For edges WITHOUT labels: omit the
valueattribute entirely (don't usevalue="")
Edge label positioning (prevents overlap with icons):
<mxCell value="Label" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;strokeWidth=2;labelBackgroundColor=#F5F5F5;fontSize=11;" edge="1" source="a" target="b" parent="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
For edges that go to services ABOVE or BELOW the main flow:
- Use explicit exit/entry points to control routing:
- Exit bottom:
exitX=0.5;exitY=1;exitDx=0;exitDy=0; - Enter top:
entryX=0.5;entryY=0;entryDx=0;entryDy=0; - Exit top:
exitX=0.5;exitY=0;exitDx=0;exitDy=0; - Enter bottom:
entryX=0.5;entryY=1;entryDx=0;entryDy=0;
- Exit bottom:
- This prevents draw.io from routing lines through other icons
Edge types:
- Solid black (
strokeWidth=2): primary data flow - Dashed black (
strokeWidth=2;dashed=1;): optional/async path - Dashed red (
strokeWidth=2;dashed=1;strokeColor=#DD344C;): error path
Edge attachment (CRITICAL — fixes "green cross" problem):
- Every edge MUST have both
source="<cell-id>"andtarget="<cell-id>"attributes referencing valid cell IDs - NEVER create floating/unattached edges — all edges must be bound to shapes at both ends
- Always include
exitX/exitYandentryX/entryYto define exact connection points on the shape perimeter - In draw.io, properly attached edges show a "blue dot" anchor; unattached edges show a "green cross"
- If