
Description
Generate AWS architecture diagrams in Mermaid or ASCII from a description, existing IaC, or conversation context. Use when the user wants to visualize an architecture.
SKILL.md
You are generating an AWS architecture diagram. Produce clear, readable diagrams that show the request/data flow through the system.
Process
- Determine the source:
- If
$ARGUMENTScontains "from-iac": scan the repo for IaC files (CDK, Terraform, CloudFormation, SAM) and reverse-engineer the architecture - Otherwise: use the description from
$ARGUMENTSor conversation context
- If
- Generate a Mermaid diagram (primary) and an ASCII fallback
- Include a legend for any non-obvious notation
Mermaid Diagram Style
Use graph LR (left-to-right) for request flows, graph TD (top-down) for hierarchical architectures.
Conventions
- Users/Clients: Stadium shape
([User]) - AWS Services: Rectangle
[Service Name] - Databases: Cylinder
[(Database)] - Queues: Parallelogram
[/Queue/] - External Services: Double-bordered
[[External API]] - Subgraphs: Group by VPC, subnet, or logical boundary
- Arrows: Label with protocol/action (e.g.,
-->|HTTPS|,-->|async|)
Example
graph LR
User([User]) -->|HTTPS| CF[CloudFront]
CF -->|HTTPS| ALB[ALB]
subgraph VPC
subgraph Public Subnet
ALB
end
subgraph Private Subnet
ECS[ECS Fargate]
ECS -->|TCP 5432| RDS[(Aurora PostgreSQL)]
ECS -->|TCP 6379| Redis[(ElastiCache Redis)]
end
end
ECS -->|HTTPS| S3[S3 Bucket]
ECS -->|SQS| Queue[/Processing Queue/]
Queue --> Lambda[Lambda Processor]
Lambda --> S3
ASCII Fallback
For environments that don't render Mermaid:
┌──────┐ ┌────────────┐ ┌─────┐
│ User │────>│ CloudFront │────>│ ALB │
└──────┘ └────────────┘ └──┬──┘
│
┌──────────────┴──────────────┐
│ VPC │
│ ┌─────────────┐ │
│ │ ECS Fargate │──> Aurora │
│ │ │──> Redis │
│ └──────┬──────┘ │
└─────────┼────────────────────┘
│
┌────┴────┐
│ SQS │──> Lambda ──> S3
└─────────┘
From IaC Reverse Engineering
When from-iac is specified:
- Glob for
*.tf,*.ts(CDK),template.yaml(SAM),*.template.json(CFN) - Extract resources, their relationships, and networking config
- Map to diagram nodes and edges
- Highlight any security concerns (public subnets, open SGs) with a warning marker
Output
Always provide:
- Mermaid diagram (in a ```mermaid code block)
- ASCII fallback (in a ``` code block)
- Flow description (1-2 sentences explaining the request/data path)
- Notes (any assumptions made, security observations)
More skills from the startups repository
View all 42 skillsagentcore
design Amazon Bedrock AgentCore architectures
Jul 12AgentsArchitectureAWSaidlc-lite
develop AI applications on AWS
Jul 12AgentsAI InfrastructureAWSEngineeringarchitect-for-startups
advise on AWS architecture for startups
Jul 12ArchitectureAWSStrategyaws-architect
design and review AWS architectures
Jul 12ArchitectureAWSInfrastructureaws-compare
compare AWS architecture options
Jul 12ArchitectureAWSCost OptimizationSecurityaws-debug
debug AWS infrastructure and deployment failures
Jul 12AWSDebuggingDeploymentObservability
More from AWS Labs
View publisheragentcore-investigation
investigate Bedrock AgentCore runtime sessions
mcp
Jul 12AWSDebuggingLogsObservabilityamazon aurora dsql
build applications with Aurora DSQL
mcp
Jul 12AuroraAWSDatabaseServerless +1aurora dsql
build applications with Aurora DSQL
mcp
Jul 12AWSDatabaseServerlessSQLaws dsql
build applications with Aurora DSQL
mcp
Jul 12AWSDatabaseMigrationServerless +1distributed postgres
build applications with Aurora DSQL
mcp
Jul 12AWSDatabasePostgreSQLServerless +1distributed sql
build applications with Aurora DSQL
mcp
Jul 12AWSDatabaseServerlessSQL