Skip to content

Instantly share code, notes, and snippets.

@SanthoshNC
Last active August 9, 2021 05:21
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
from diagrams import Cluster, Diagram
from diagrams.aws.compute import ECS
from diagrams.aws.network import ELB, Route53
from diagrams.aws.database import RDS
from diagrams.onprem.client import User
graph_attr = {
"fontsize": "25",
"bgcolor": "transparent"
}
with Diagram("Advanced Diagram", show=False, outformat="jpg", filename="my_diagram"):
dns = Route53("dns")
lb = ELB("lb")
with Cluster("Services"):
web_service_group = [ECS("web1"), ECS("web2")]
with Cluster("DB Cluster"):
db_master = RDS("db1 master")
db_master - [RDS("db1 read only")]
User("User") >> dns >> lb >> web_service_group
web_service_group >> db_master
web_service_group << db_master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment