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"):
"lb") >> [EC2("worker1"),
ELB("worker2"),
EC2("worker3"),
EC2("worker4"),
EC2("worker5")] >> RDS("events") EC2(
from diagrams import Diagram, Cluster
from diagrams.aws.compute import ECS, EC2
from diagrams.aws.network import VPC, PublicSubnet
from diagrams.aws.compute import ECR
from diagrams.aws.security import IAMRole
with Diagram("AWS ECS Deployment", show=False, filename="aws_ecs_deployment_diagram"):
with Cluster("AWS Cloud", ):
with Cluster("VPC"):
with Cluster("Availability Zone"):
with Cluster("Public subnet"):
= EC2("ecs-instance")
ecs_instance
>> ECR("Elastic Container Registry") >> ECS("Elastic Container Services Cluster")
ecs_instance = ECR("ecs-container-repo")
ecs_repo = IAMRole("ecs-task-role")
ecs_role
- ecs_repo - ecs_role ecs_instance
from diagrams import Diagram, Cluster
from diagrams.aws.compute import EC2
from diagrams.aws.storage import S3
from diagrams.onprem.compute import Server
from diagrams.onprem.client import Users
with Diagram("MLOps System", show=False):
with Cluster("AWS"):
= EC2("Fargate Container")
fargate = S3("S3 Bucket")
s3 = EC2("EC2 Instance")
ec2 with Cluster("ML Workflow"):
= Server("Data Processing")
processing = Server("Model Training")
training
= Users("Users1")
users
# Frontend Fargate container triggered by user action
>> fargate
users
# Data upload to S3 bucket
>> s3
fargate
# Data processing and training
>> processing >> training
s3
# Report data back to S3 bucket
>> s3 training