Build cloud architecture diagrams without leaving your IDE
Introducing Diagrams: Diagram as Code .Build cloud architecture diagrams without leaving your IDE
Diagrams let you draw a cloud system architecture in Python code. It was born for prototyping a new system architecture design without any design tools.
Diagram as Code also allows you to track the architecture diagram changes on any version control system.
Note: It does not control any actual cloud resources nor generate cloud formation or terraform code, but only for drawing cloud system architecture diagrams.
Here are some examples:
from diagrams import Diagram from diagrams.aws.compute import EC2 from diagrams.aws.database import RDS from diagrams.aws.network import ELB with Diagram("Grouped Workers", show=False, direction="TB"): ELB("lb") >> [EC2("worker1"), EC2("worker2"), EC2("worker3"), EC2("worker4"), EC2("worker5")] >> RDS("events")
from diagrams import Cluster, Diagram from diagrams.aws.compute import ECS, EKS, Lambda from diagrams.aws.database import Redshift from diagrams.aws.integration import SQS from diagrams.aws.storage import S3 with Diagram("Event Processing", show=False): source = EKS("k8s source") with Cluster("Event Flows"): with Cluster("Event Workers"): workers = [ECS("worker1"), ECS("worker2"), ECS("worker3")] queue = SQS("event queue") with Cluster("Processing"): handlers = [Lambda("proc1"), Lambda("proc2"), Lambda("proc3")] store = S3("events store") dw = Redshift("analytics") source >> workers >> queue >> handlers handlers >> store handlers >> dw
You can find all the examples on the examples page.