Skip to content

Instantly share code, notes, and snippets.

@RajChowdhury240
Created June 1, 2025 19:02
Show Gist options
  • Save RajChowdhury240/777c063180937b421a57bd80035dca70 to your computer and use it in GitHub Desktop.
Save RajChowdhury240/777c063180937b421a57bd80035dca70 to your computer and use it in GitHub Desktop.
from diagrams import Diagram, Cluster
from diagrams.aws.network import VPC, ELB, APIGateway
from diagrams.aws.compute import EC2, Lambda
from diagrams.aws.database import RDS, Dynamodb
from diagrams.aws.storage import S3
from diagrams.aws.analytics import Glue
with Diagram("Serverless Architecture", show=True):
s3 = S3("S3 Bucket")
api = APIGateway("API Gateway")
with Cluster("VPC"):
with Cluster("Public Subnet"):
lb = ELB("Load Balancer")
web_ec2 = EC2("EC2 Instance")
with Cluster("Private Subnet"):
lam = Lambda("Lambda Function")
rds_db = RDS("RDS")
dynamo = Dynamodb("DynamoDB")
glue = Glue("Glue")
lb >> web_ec2 >> rds_db
api >> lam
lam >> dynamo
lam >> rds_db
s3 >> lam
s3 >> glue
glue >> rds_db
@RajChowdhury240
Copy link
Author

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment