text
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"
"[INST]
Based on the below provided JSON, please create the diagram generation code.
{""global_config"":{""Network Services"":[""Route53""]},""regional_config"":{""Regions"":[""us-east-1"",""us-east-2""],""Network Services"":[""VPC"",""ELB""]},""APP"":{""config"":{""availability_zones"":[""us-east-1a"",""us-east-1b"",""us-east-2a"",""us-east-2b""],""compute_services"":[""EC2Instance""],""network_services"":[""PublicSubnet""]}},""DB"":{""config"":{""availability_zones"":[""us-east-1b"",""us-east-1a"",""us-east-2a"",""us-east-2b""],""network_services"":[""PrivateSubnet""],""data_services"":[""RDS""]}},""interactions"":[[""Internet"",""App"",""Network Connection""],[""App"",""Database"",""Network Connection""],[""OnPremise"",""App"",""Network Connection""]]}
[/INST]""from diagrams import Cluster, Diagram\nfrom diagrams.aws.compute import EC2\nfrom diagrams.aws.network import ELB, Route53, VPC\nfrom diagrams.aws.database import RDS\nfrom diagrams.onprem.client import User\nfrom diagrams.onprem.network import Internet\nfrom diagrams.aws.storage import SimpleStorageServiceS3\nfrom diagrams.aws.network import APIGatewayEndpoint, APIGateway\nfrom diagrams.aws.management import Cloudwatch\nfrom diagrams.aws.security import IdentityAndAccessManagementIam\nfrom diagrams.onprem.compute import Server\nfrom diagrams.aws.network import DirectConnect\ndef generate_diagram():\n with Diagram(\""AWS Architecture\"", show=False):\n internet = Internet(\""Internet\"")\n user = User(\""On-Premise\"")\n ExternalComponent = Server(\""On-Premise Component\"")\n dc = DirectConnect(\""DirectConnect Gateway\"")\n\n with Cluster(\""AWS Global\""):\n route53 = Route53(\""Route53\"")\n IAM = IdentityAndAccessManagementIam(\""IAM\"")\n\n regions = {region: region for region in app_config[\""regional_config\""][\""Regions\""]}\n\n for region in regions:\n with Cluster(f\""Region {region}\""):\n elb = ELB(f\""ELB {region}\"")\n s3_instance = SimpleStorageServiceS3(f\""S3 Object Store {region}\"")\n s3_gateway = APIGatewayEndpoint(\""S3 Gateway\"")\n cloudwatch_instance = Cloudwatch(f\""CloudWatch for Monitoring {region}\"")\n route53 >> elb\n with Cluster(f\""VPC {region}\""):\n azs = set(app_config[\""WEB\""][\""config\""][\""availability_zones\""] + app_config[\""APP\""][\""config\""][\""availability_zones\""] + app_config[\""DB\""][\""config\""][\""availability_zones\""])\n for az in azs:\n if az.startswith(region):\n with Cluster(f\""AZ {az}\""):\n with Cluster(\""Public Subnet\""):\n WEB_instance = EC2(\""WEB-AutoScaling EC2\"")\n elb >> WEB_instance\n WEB_instance >> cloudwatch_instance\n with Cluster(\""Private Subnet1\""):\n APP_instance = EC2(\""APP-AutoScaling EC2\"")\n APP_instance >> s3_gateway\n s3_instance >> s3_gateway\n APP_instance >> cloudwatch_instance\n APP_instance >> dc\n dc >> ExternalComponent\n WEB_instance >> APP_instance\n with Cluster(\""Private Subnet2\""):\n rds_instance = RDS(\""RDS Instance\"")\n APP_instance >> rds_instance\n rds_instance >> cloudwatch_instance\n\n\n internet >> route53\n user >> route53\n#if __name__ == \""__main__\"":\n # generate_diagram()\nif __name__ == \""__main__\"":\n generate_diagram()""
"