# aws resources from diagrams.aws.compute import ECS from diagrams.aws.storage import S3 from diagrams.aws.general import TradicionalServer, GenericSamlToken from diagrams.aws.engagement import SimpleEmailServiceSes from diagrams.aws.network import ElasticLoadBalancing from diagrams.aws.database import RDS, Elasticache from diagrams.aws.analytics import ElasticsearchService from diagrams.aws.security import Cognito with Diagram("Graph3", show=True, outformat="png"): #STEP1:set up groups and entities with Cluster("Public"): with Cluster("Observer"): oUser = User("") oDevice = Mobile("") with Cluster("Dept"): with Cluster("Department Staff"): dsUser = User("") dsDevice = Client("") with Cluster("AWS Cloud"): with Cluster("Mobile Updates"): s3 = S3("S3 Bucket") with Cluster("Management App"): elb = ElasticLoadBalancing("Load Balancer") maECS = ECS("ECS Container") with Cluster("Search and Reporting"):
from diagrams import Cluster, Diagram from diagrams.generic.database import SQL from diagrams.aws.database import RDSMysqlInstance from diagrams.generic.device import Mobile from diagrams.programming.language import Python from diagrams.custom import Custom from diagrams.onprem.monitoring import Grafana with Diagram("Event processing",show=False): phone = Mobile("Phone running Owntracks") with Cluster("Services"): connector = Python("Connector") mysql = RDSMysqlInstance("MYSQL DB") mqtt = Custom("MQTT broker", "./mosquitto.png") grafana = Grafana("Grafana") phone >> mqtt >> connector >> mysql << grafana
from diagrams.programming.framework import Spring from diagrams.programming.language import Csharp from diagrams.programming.language import Go from diagrams.programming.language import Typescript from diagrams.generic.device import Mobile from diagrams.generic.os import Windows with Diagram("Architecture", show=False, direction="BT"): api_gateway = Custom("API-Gateway\n(KrakenD)", "./pics/krakend.png") with Cluster("\nMicrosrvices"): microservices = [ Go("advanced"), Csharp("dotnetapi"), Go("greeter"), Go("mathservice"), Spring("springapi"), Go("task-api"), Typescript("tsoaapi") ] with Cluster("Application Layer"): application = [Mobile("Mobile"), Windows("Browser")] openapi = Custom("OpenAPI", "./pics/openapi.png") api_gateway >> microservices api_gateway >> openapi application >> api_gateway
from diagrams.generic.device import Mobile from diagrams.generic.os import IOS from diagrams.onprem.compute import Server from diagrams import Cluster, Diagram, Edge with Diagram("Purchasing Flow"): with Cluster('Player'): payment = Mobile("Payment") fulfillment = Mobile("Fulfillment") with Cluster('Services'): iap = IOS("IAP Backend") backend = Server("Game Backend") payment >> Edge(label = 'do purchase') >> iap fulfillment << Edge(label = 'receipt, product ID') << iap fulfillment >> Edge(label = 'receipt') >> backend backend >> Edge(label = 'is receipt good?') >> iap >> backend backend >> Edge(label = 'updated player') >> fulfillment
from diagrams.aws.storage import S3 from diagrams.aws.security import Cognito from diagrams.aws.analytics import Athena from diagrams.aws.analytics import GlueCrawlers from diagrams.aws.analytics import GlueDataCatalog from diagrams.aws.compute import Lambda from diagrams.aws.mobile import APIGatewayEndpoint, APIGateway from diagrams.onprem.client import Client from diagrams.aws.database import DynamodbTable, DDB from diagrams.aws.engagement import SES from diagrams.aws.integration import SQS graph_attr = {"esep": "+20", "fontsize": "45"} node_attr = {"esep": "+20", "fontsize": "10"} with Diagram("Whatsapp-Lex-Appointments", show=True, direction='LR', graph_attr=graph_attr, node_attr=node_attr): _ddb = DDB('DynamoDB Agendas Solcitadas') _lambda = Lambda('Lambda Agendar') _lambda << Edge() >> _ddb _device = Mobile('Whatsapp') _lex = Lex('Bot de Agendamiento') _device << Edge() >> _lex _lex >> Edge(label='Intent') >> _lambda