Skip to content
aws-diagram logo

AWS Diagram Generator

aws-diagram

Generate AWS architecture diagrams from infrastructure JSON. Use when user asks to "generate diagram", "create AWS diagram", "visualize infrastructure", or "draw architecture".

SKILL.md

Full skill instructions

AWS Diagram Generator

Generate architecture diagrams from aws_infrastructure.json using the Python diagrams library.

Before Starting

  1. Check that aws_infrastructure.json exists in the current directory

  2. Ask user which diagram type they want:

    • architecture - Overall infrastructure overview
    • security - Security controls and traffic flow
    • network - Network topology and connectivity
    • data-flow - Data flow between components
    • all - Generate all types
  3. Ask for output format: png (default), svg, or pdf

Process

  1. Read aws_infrastructure.json
  2. Generate Python code using the diagrams library
  3. Write the code to a temporary file
  4. Execute it with python <file>.py
  5. Report the generated files to the user

Diagrams Library Reference

Basic Structure

from diagrams import Diagram, Cluster, Edge

with Diagram("Title", filename="output_name", outformat="png", show=False):
    # Create nodes and connections

AWS Icons (import from diagrams.aws.*)

Compute:

from diagrams.aws.compute import ECS, Lambda, Fargate, EC2, EKS, Batch, ECR

Database:

from diagrams.aws.database import RDS, Aurora, ElastiCache, Dynamodb, DocumentDB, Neptune, Redshift

Note: Use Dynamodb (not DynamoDB)

Network:

from diagrams.aws.network import ALB, NLB, CloudFront, Route53, VPC, InternetGateway, NATGateway, TransitGateway, Endpoint, APIGateway

Storage:

from diagrams.aws.storage import S3, EFS

Security:

from diagrams.aws.security import WAF, Shield, ACM, Cognito, SecretsManager, KMS, IAM

Integration:

from diagrams.aws.integration import SQS, SNS, Eventbridge, StepFunctions

Note: Use Eventbridge (not EventBridge)

Analytics:

from diagrams.aws.analytics import Kinesis, Athena, Glue, EMR, Quicksight

Management:

from diagrams.aws.management import Cloudwatch, CloudwatchAlarm, Cloudtrail

General (for unknown services):

from diagrams.aws.general import General

External/​Users:

from diagrams.onprem.network import Internet
from diagrams.onprem.client import Users

Connections

# Left to right flow
node1 >> node2
node1 >> Edge(label="HTTPS") >> node2

# Multiple targets
node1 >> [node2, node3]

Clusters (for grouping)

with Cluster("VPC"):
    with Cluster("Public Subnet"):
        alb = ALB("Load Balancer")
    with Cluster("Private Subnet"):
        app = Fargate("App")

Diagram Types

Architecture Diagram

Show overall infrastructure:

  • Internet/​Users connecting to load balancers
  • Load balancers to compute (ECS, Lambda, EC2)
  • Compute to databases (RDS, DynamoDB, ElastiCache)
  • Storage services (S3)
  • Group by VPC and subnet types

Security Diagram

Show security controls:

  • WAF protecting load balancers
  • Cognito for authentication
  • ACM certificates
  • Security boundaries (VPC, subnets)
  • Traffic flow from external to internal
  • KMS, Secrets Manager

Network Diagram

Show network topology:

  • VPC with CIDR
  • Subnets grouped by availability zone
  • Internet Gateway and NAT Gateways
  • Transit Gateway connections
  • VPC Endpoints

Data Flow Diagram

Show data movement:

  • How data enters (API, events)
  • Processing pipeline (compute services)
  • Data storage destinations
  • Caching layers
  • Event flows (SQS, SNS, EventBridge)

Output Files

Use these filenames:

  • aws_architecture.png
  • aws_security.png
  • aws_network.png
  • aws_data_flow.png

Guidelines

  1. Set show=False in Diagram constructor
  2. Create meaningful labels from the JSON data
  3. Draw connections based on logical relationships
  4. Use Clusters to group related resources
  5. Limit displayed items to 3-5 per category for readability
  6. For services not in the library, use General
  7. Always use the exact import names (case-sensitive)

Example Generated Code

from diagrams import Diagram, Cluster
from diagrams.aws.compute import Fargate
from diagrams.aws.database import RDS, ElastiCache
from diagrams.aws.network import ALB, InternetGateway
from diagrams.aws.storage import S3
from diagrams.onprem.network import Internet

with Diagram("AWS Architecture - MyProject (PROD)", filename="aws_architecture", outformat="png", show=False):
    internet = Internet("Users")

    with Cluster("VPC: 10.0.0.0/​16"):
        igw = InternetGateway("IGW")

        with Cluster("Public Subnet"):
            alb = ALB("Public ALB")

        with Cluster("Private Subnet"):
            with Cluster("ECS Cluster"):
                svc1 = Fargate("api")
                svc2 = Fargate("worker")

            db = RDS("Aurora")
            cache = ElastiCache("Redis")

    s3 = S3("Assets")

    internet >> igw >> alb >> [svc1, svc2]
    svc1 >> [db, cache, s3]
    svc2 >> [db, s3]

After Generation

Tell the user:

  1. Which diagram files were created
  2. They can open PNG/​SVG directly or import into documentation

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View