{
  "Description": "(SO0158-Demo) - The AWS CloudFormation template for deployment of the application-monitoring-with-amazon-cloudwatch Apache workload demo resource. Version v1.2.6",
  "AWSTemplateFormatVersion": "2010-09-09",
  "Mappings": {
    "StackMap": {
      "Nginx": {
        "AccessLog": "/cw-monitoring-framework/nginx/access",
        "InfraConfig": "https://solutions-reference.s3.amazonaws.com/application-monitoring-with-amazon-cloudwatch/v1.2.6/linux_cw_infra.json",
        "NginxConfig": "https://solutions-reference.s3.amazonaws.com/application-monitoring-with-amazon-cloudwatch/v1.2.6/nginx.config/nginx.json",
        "httpdConfig": "https://solutions-reference.s3.amazonaws.com/application-monitoring-with-amazon-cloudwatch/v1.2.6/nginx.config/nginx.conf",
        "CloudWatchAgent": "https://solutions-reference.s3.amazonaws.com/application-monitoring-with-amazon-cloudwatch/v1.2.6/amazon-cloudwatch-agent.rpm"
      }
    }
  },
  "Resources": {
    "NginxDemoInfraDemoVPCE920B1C2": {
      "Type": "AWS::EC2::VPC",
      "Properties": {
        "CidrBlock": "10.0.1.0/26",
        "EnableDnsHostnames": true,
        "EnableDnsSupport": true,
        "InstanceTenancy": "default",
        "Tags": [
          {
            "Key": "Name",
            "Value": "CW-Monitoring-Framework-Stack/Nginx-Demo-Stack/NginxDemoInfra/DemoVPC"
          }
        ]
      },
      "Metadata": {
        "aws:cdk:path": "CW-Monitoring-Framework-Stack/Nginx-Demo-Stack/NginxDemoInfra/DemoVPC/Resource"
      }
    },
    "NginxDemoInfraDemoVPCPublicSubnetSubnet1SubnetF5ABB7EE": {
      "Type": "AWS::EC2::Subnet",
      "Properties": {
        "AvailabilityZone": {
          "Fn::Select": [
            0,
            {
              "Fn::GetAZs": ""
            }
          ]
        },
        "CidrBlock": "10.0.1.0/28",
        "MapPublicIpOnLaunch": true,
        "Tags": [
          {
            "Key": "aws-cdk:subnet-name",
            "Value": "PublicSubnet"
          },
          {
            "Key": "aws-cdk:subnet-type",
            "Value": "Public"
          },
          {
            "Key": "Name",
            "Value": "CW-Monitoring-Framework-Stack/Nginx-Demo-Stack/NginxDemoInfra/DemoVPC/PublicSubnetSubnet1"
          }
        ],
        "VpcId": {
          "Ref": "NginxDemoInfraDemoVPCE920B1C2"
        }
      },
      "Metadata": {
        "cfn_nag": {
          "rules_to_suppress": [
            {
              "id": "W33",
              "reason": "Need public IP for demo web server "
            }
          ]
        }
      }
    },
    "NginxDemoInfraDemoVPCPublicSubnetSubnet1RouteTableB3011CC8": {
      "Type": "AWS::EC2::RouteTable",
      "Properties": {
        "Tags": [
          {
            "Key": "Name",
            "Value": "CW-Monitoring-Framework-Stack/Nginx-Demo-Stack/NginxDemoInfra/DemoVPC/PublicSubnetSubnet1"
          }
        ],
        "VpcId": {
          "Ref": "NginxDemoInfraDemoVPCE920B1C2"
        }
      },
      "Metadata": {
        "aws:cdk:path": "CW-Monitoring-Framework-Stack/Nginx-Demo-Stack/NginxDemoInfra/DemoVPC/PublicSubnetSubnet1/RouteTable"
      }
    },
    "NginxDemoInfraDemoVPCPublicSubnetSubnet1RouteTableAssociation82D72FC4": {
      "Type": "AWS::EC2::SubnetRouteTableAssociation",
      "Properties": {
        "RouteTableId": {
          "Ref": "NginxDemoInfraDemoVPCPublicSubnetSubnet1RouteTableB3011CC8"
        },
        "SubnetId": {
          "Ref": "NginxDemoInfraDemoVPCPublicSubnetSubnet1SubnetF5ABB7EE"
        }
      },
      "Metadata": {
        "aws:cdk:path": "CW-Monitoring-Framework-Stack/Nginx-Demo-Stack/NginxDemoInfra/DemoVPC/PublicSubnetSubnet1/RouteTableAssociation"
      }
    },
    "NginxDemoInfraDemoVPCPublicSubnetSubnet1DefaultRouteABDF0BD2": {
      "Type": "AWS::EC2::Route",
      "Properties": {
        "DestinationCidrBlock": "0.0.0.0/0",
        "GatewayId": {
          "Ref": "NginxDemoInfraDemoVPCIGW56E961BB"
        },
        "RouteTableId": {
          "Ref": "NginxDemoInfraDemoVPCPublicSubnetSubnet1RouteTableB3011CC8"
        }
      },
      "DependsOn": [
        "NginxDemoInfraDemoVPCVPCGW017BD74E"
      ],
      "Metadata": {
        "aws:cdk:path": "CW-Monitoring-Framework-Stack/Nginx-Demo-Stack/NginxDemoInfra/DemoVPC/PublicSubnetSubnet1/DefaultRoute"
      }
    },
    "NginxDemoInfraDemoVPCPublicSubnetSubnet2SubnetF6543F12": {
      "Type": "AWS::EC2::Subnet",
      "Properties": {
        "AvailabilityZone": {
          "Fn::Select": [
            1,
            {
              "Fn::GetAZs": ""
            }
          ]
        },
        "CidrBlock": "10.0.1.16/28",
        "MapPublicIpOnLaunch": true,
        "Tags": [
          {
            "Key": "aws-cdk:subnet-name",
            "Value": "PublicSubnet"
          },
          {
            "Key": "aws-cdk:subnet-type",
            "Value": "Public"
          },
          {
            "Key": "Name",
            "Value": "CW-Monitoring-Framework-Stack/Nginx-Demo-Stack/NginxDemoInfra/DemoVPC/PublicSubnetSubnet2"
          }
        ],
        "VpcId": {
          "Ref": "NginxDemoInfraDemoVPCE920B1C2"
        }
      },
      "Metadata": {
        "cfn_nag": {
          "rules_to_suppress": [
            {
              "id": "W33",
              "reason": "Need public IP for demo web server "
            }
          ]
        }
      }
    },
    "NginxDemoInfraDemoVPCPublicSubnetSubnet2RouteTable3DD9FF4A": {
      "Type": "AWS::EC2::RouteTable",
      "Properties": {
        "Tags": [
          {
            "Key": "Name",
            "Value": "CW-Monitoring-Framework-Stack/Nginx-Demo-Stack/NginxDemoInfra/DemoVPC/PublicSubnetSubnet2"
          }
        ],
        "VpcId": {
          "Ref": "NginxDemoInfraDemoVPCE920B1C2"
        }
      },
      "Metadata": {
        "aws:cdk:path": "CW-Monitoring-Framework-Stack/Nginx-Demo-Stack/NginxDemoInfra/DemoVPC/PublicSubnetSubnet2/RouteTable"
      }
    },
    "NginxDemoInfraDemoVPCPublicSubnetSubnet2RouteTableAssociationE9AFA5CE": {
      "Type": "AWS::EC2::SubnetRouteTableAssociation",
      "Properties": {
        "RouteTableId": {
          "Ref": "NginxDemoInfraDemoVPCPublicSubnetSubnet2RouteTable3DD9FF4A"
        },
        "SubnetId": {
          "Ref": "NginxDemoInfraDemoVPCPublicSubnetSubnet2SubnetF6543F12"
        }
      },
      "Metadata": {
        "aws:cdk:path": "CW-Monitoring-Framework-Stack/Nginx-Demo-Stack/NginxDemoInfra/DemoVPC/PublicSubnetSubnet2/RouteTableAssociation"
      }
    },
    "NginxDemoInfraDemoVPCPublicSubnetSubnet2DefaultRouteCDA6F287": {
      "Type": "AWS::EC2::Route",
      "Properties": {
        "DestinationCidrBlock": "0.0.0.0/0",
        "GatewayId": {
          "Ref": "NginxDemoInfraDemoVPCIGW56E961BB"
        },
        "RouteTableId": {
          "Ref": "NginxDemoInfraDemoVPCPublicSubnetSubnet2RouteTable3DD9FF4A"
        }
      },
      "DependsOn": [
        "NginxDemoInfraDemoVPCVPCGW017BD74E"
      ],
      "Metadata": {
        "aws:cdk:path": "CW-Monitoring-Framework-Stack/Nginx-Demo-Stack/NginxDemoInfra/DemoVPC/PublicSubnetSubnet2/DefaultRoute"
      }
    },
    "NginxDemoInfraDemoVPCIGW56E961BB": {
      "Type": "AWS::EC2::InternetGateway",
      "Properties": {
        "Tags": [
          {
            "Key": "Name",
            "Value": "CW-Monitoring-Framework-Stack/Nginx-Demo-Stack/NginxDemoInfra/DemoVPC"
          }
        ]
      },
      "Metadata": {
        "aws:cdk:path": "CW-Monitoring-Framework-Stack/Nginx-Demo-Stack/NginxDemoInfra/DemoVPC/IGW"
      }
    },
    "NginxDemoInfraDemoVPCVPCGW017BD74E": {
      "Type": "AWS::EC2::VPCGatewayAttachment",
      "Properties": {
        "InternetGatewayId": {
          "Ref": "NginxDemoInfraDemoVPCIGW56E961BB"
        },
        "VpcId": {
          "Ref": "NginxDemoInfraDemoVPCE920B1C2"
        }
      },
      "Metadata": {
        "aws:cdk:path": "CW-Monitoring-Framework-Stack/Nginx-Demo-Stack/NginxDemoInfra/DemoVPC/VPCGW"
      }
    },
    "NginxDemoInfraVPCFlowLogGroupB430638B": {
      "Type": "AWS::Logs::LogGroup",
      "Properties": {
        "RetentionInDays": 7
      },
      "UpdateReplacePolicy": "Delete",
      "DeletionPolicy": "Delete",
      "Metadata": {
        "cfn_nag": {
          "rules_to_suppress": [
            {
              "id": "W84",
              "reason": " log group is encrypted with the default master key"
            }
          ]
        }
      }
    },
    "NginxDemoInfraflowRole61EAC099": {
      "Type": "AWS::IAM::Role",
      "Properties": {
        "AssumeRolePolicyDocument": {
          "Statement": [
            {
              "Action": "sts:AssumeRole",
              "Effect": "Allow",
              "Principal": {
                "Service": "vpc-flow-logs.amazonaws.com"
              }
            }
          ],
          "Version": "2012-10-17"
        }
      },
      "Metadata": {
        "aws:cdk:path": "CW-Monitoring-Framework-Stack/Nginx-Demo-Stack/NginxDemoInfra/flowRole/Resource"
      }
    },
    "NginxDemoInfraflowRoleDefaultPolicy83507F0C": {
      "Type": "AWS::IAM::Policy",
      "Properties": {
        "PolicyDocument": {
          "Statement": [
            {
              "Action": [
                "logs:CreateLogStream",
                "logs:PutLogEvents",
                "logs:DescribeLogStreams"
              ],
              "Effect": "Allow",
              "Resource": {
                "Fn::GetAtt": [
                  "NginxDemoInfraVPCFlowLogGroupB430638B",
                  "Arn"
                ]
              }
            },
            {
              "Action": "iam:PassRole",
              "Effect": "Allow",
              "Resource": {
                "Fn::GetAtt": [
                  "NginxDemoInfraflowRole61EAC099",
                  "Arn"
                ]
              }
            }
          ],
          "Version": "2012-10-17"
        },
        "PolicyName": "NginxDemoInfraflowRoleDefaultPolicy83507F0C",
        "Roles": [
          {
            "Ref": "NginxDemoInfraflowRole61EAC099"
          }
        ]
      },
      "Metadata": {
        "aws:cdk:path": "CW-Monitoring-Framework-Stack/Nginx-Demo-Stack/NginxDemoInfra/flowRole/DefaultPolicy/Resource"
      }
    },
    "NginxDemoInfraDemoFlowLogBFA053EA": {
      "Type": "AWS::EC2::FlowLog",
      "Properties": {
        "DeliverLogsPermissionArn": {
          "Fn::GetAtt": [
            "NginxDemoInfraflowRole61EAC099",
            "Arn"
          ]
        },
        "LogDestinationType": "cloud-watch-logs",
        "LogGroupName": {
          "Ref": "NginxDemoInfraVPCFlowLogGroupB430638B"
        },
        "ResourceId": {
          "Ref": "NginxDemoInfraDemoVPCE920B1C2"
        },
        "ResourceType": "VPC",
        "Tags": [
          {
            "Key": "Name",
            "Value": "CW-Monitoring-Framework-Stack/Nginx-Demo-Stack/NginxDemoInfra/DemoFlowLog"
          }
        ],
        "TrafficType": "ALL"
      },
      "Metadata": {
        "aws:cdk:path": "CW-Monitoring-Framework-Stack/Nginx-Demo-Stack/NginxDemoInfra/DemoFlowLog/FlowLog"
      }
    },
    "NginxDemoInfraDemoSG97D2FF16": {
      "Type": "AWS::EC2::SecurityGroup",
      "Properties": {
        "GroupDescription": "CW-Monitoring-Framework-Stack/Nginx-Demo-Stack/NginxDemoInfra/DemoSG",
        "SecurityGroupEgress": [
          {
            "CidrIp": "0.0.0.0/0",
            "Description": "allow outbound http",
            "FromPort": 80,
            "IpProtocol": "tcp",
            "ToPort": 80
          },
          {
            "CidrIp": "0.0.0.0/0",
            "Description": "allow outbound https",
            "FromPort": 443,
            "IpProtocol": "tcp",
            "ToPort": 443
          }
        ],
        "SecurityGroupIngress": [
          {
            "CidrIp": "0.0.0.0/0",
            "Description": "allow HTTP traffic",
            "FromPort": 80,
            "IpProtocol": "tcp",
            "ToPort": 80
          }
        ],
        "VpcId": {
          "Ref": "NginxDemoInfraDemoVPCE920B1C2"
        }
      },
      "Metadata": {
        "cfn_nag": {
          "rules_to_suppress": [
            {
              "id": "W40",
              "reason": "Demo resource"
            },
            {
              "id": "W5",
              "reason": "Demo resource"
            },
            {
              "id": "W9",
              "reason": "Demo resource"
            },
            {
              "id": "W2",
              "reason": "Demo resource"
            }
          ]
        }
      }
    },
    "NginxDemoInfraDemoInstancePolicyE469D1CE": {
      "Type": "AWS::IAM::Policy",
      "Properties": {
        "PolicyDocument": {
          "Statement": [
            {
              "Action": [
                "cloudwatch:PutMetricData",
                "ec2:DescribeVolumes",
                "ec2:DescribeTags",
                "logs:PutLogEvents",
                "logs:DescribeLogStreams",
                "logs:DescribeLogGroups",
                "logs:CreateLogStream",
                "logs:CreateLogGroup"
              ],
              "Effect": "Allow",
              "Resource": "*",
              "Sid": "CWWrite"
            }
          ],
          "Version": "2012-10-17"
        },
        "PolicyName": "NginxDemoInfraDemoInstancePolicyE469D1CE",
        "Roles": [
          {
            "Ref": "NginxDemoEC2InstanceRoleD1019275"
          }
        ]
      },
      "Metadata": {
        "cfn_nag": {
          "rules_to_suppress": [
            {
              "id": "W12",
              "reason": "* is required for creating log groups and put metrics"
            }
          ]
        }
      }
    },
    "NginxDemoEC2InstanceRoleD1019275": {
      "Type": "AWS::IAM::Role",
      "Properties": {
        "AssumeRolePolicyDocument": {
          "Statement": [
            {
              "Action": "sts:AssumeRole",
              "Effect": "Allow",
              "Principal": {
                "Service": "ec2.amazonaws.com"
              }
            }
          ],
          "Version": "2012-10-17"
        },
        "Tags": [
          {
            "Key": "Name",
            "Value": "CW-Monitoring-Framework-Stack/Nginx-Demo-Stack/NginxDemoEC2"
          }
        ]
      },
      "Metadata": {
        "aws:cdk:path": "CW-Monitoring-Framework-Stack/Nginx-Demo-Stack/NginxDemoEC2/InstanceRole/Resource"
      }
    },
    "NginxDemoEC2InstanceRoleDefaultPolicyF228584C": {
      "Type": "AWS::IAM::Policy",
      "Properties": {
        "PolicyDocument": {
          "Statement": [
            {
              "Action": [
                "cloudformation:DescribeStackResource",
                "cloudformation:SignalResource"
              ],
              "Effect": "Allow",
              "Resource": {
                "Ref": "AWS::StackId"
              }
            }
          ],
          "Version": "2012-10-17"
        },
        "PolicyName": "NginxDemoEC2InstanceRoleDefaultPolicyF228584C",
        "Roles": [
          {
            "Ref": "NginxDemoEC2InstanceRoleD1019275"
          }
        ]
      },
      "Metadata": {
        "aws:cdk:path": "CW-Monitoring-Framework-Stack/Nginx-Demo-Stack/NginxDemoEC2/InstanceRole/DefaultPolicy/Resource"
      }
    },
    "NginxDemoEC2InstanceProfile3A8828A6": {
      "Type": "AWS::IAM::InstanceProfile",
      "Properties": {
        "Roles": [
          {
            "Ref": "NginxDemoEC2InstanceRoleD1019275"
          }
        ]
      },
      "Metadata": {
        "aws:cdk:path": "CW-Monitoring-Framework-Stack/Nginx-Demo-Stack/NginxDemoEC2/InstanceProfile"
      }
    },
    "NginxDemoEC21F74A6F3": {
      "Type": "AWS::EC2::Instance",
      "Properties": {
        "AvailabilityZone": {
          "Fn::Select": [
            0,
            {
              "Fn::GetAZs": ""
            }
          ]
        },
        "IamInstanceProfile": {
          "Ref": "NginxDemoEC2InstanceProfile3A8828A6"
        },
        "ImageId": {
          "Ref": "SsmParameterValueawsserviceamiamazonlinuxlatestamzn2amikernel510hvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter"
        },
        "InstanceType": "t3.micro",
        "LaunchTemplate": {
          "LaunchTemplateName": "NginxDemoEC2LaunchTemplate",
          "Version": {
            "Fn::GetAtt": [
              "NginxDemoEC2LaunchTemplate7F0CED0D",
              "LatestVersionNumber"
            ]
          }
        },
        "SecurityGroupIds": [
          {
            "Fn::GetAtt": [
              "NginxDemoInfraDemoSG97D2FF16",
              "GroupId"
            ]
          }
        ],
        "SubnetId": {
          "Ref": "NginxDemoInfraDemoVPCPublicSubnetSubnet1SubnetF5ABB7EE"
        },
        "Tags": [
          {
            "Key": "Name",
            "Value": "CW-Monitoring-Framework-Stack/Nginx-Demo-Stack/NginxDemoEC2"
          }
        ],
        "UserData": {
          "Fn::Base64": {
            "Fn::Join": [
              "",
              [
                "#!/bin/bash\n# fingerprint: 0ae9b3f2b95f855e\n(\n  set +e\n  /opt/aws/bin/cfn-init -v --region ",
                {
                  "Ref": "AWS::Region"
                },
                " --stack ",
                {
                  "Ref": "AWS::StackName"
                },
                " --resource NginxDemoEC21F74A6F3 -c default\n  /opt/aws/bin/cfn-signal -e $? --region ",
                {
                  "Ref": "AWS::Region"
                },
                " --stack ",
                {
                  "Ref": "AWS::StackName"
                },
                " --resource NginxDemoEC21F74A6F3\n  cat /var/log/cfn-init.log >&2\n)\necho \"======setting up cloudwatch agent======\"\n/opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a fetch-config -m ec2 -s -c file:/opt/aws/amazon-cloudwatch-agent/bin/infra_config.json\n/opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a append-config -m ec2 -s -c file:/opt/aws/amazon-cloudwatch-agent/bin/nginx_config.json\ncurl 127.0.0.1"
              ]
            ]
          }
        }
      },
      "DependsOn": [
        "NginxDemoEC2InstanceRoleDefaultPolicyF228584C",
        "NginxDemoEC2InstanceRoleD1019275"
      ],
      "CreationPolicy": {
        "ResourceSignal": {
          "Count": 1,
          "Timeout": "PT5M"
        }
      },
      "Metadata": {
        "aws:cdk:path": "CW-Monitoring-Framework-Stack/Nginx-Demo-Stack/NginxDemoEC2/Resource",
        "AWS::CloudFormation::Init": {
          "configSets": {
            "default": [
              "config"
            ]
          },
          "config": {
            "packages": {
              "rpm": {
                "000": [
                  {
                    "Fn::FindInMap": [
                      "StackMap",
                      "Nginx",
                      "CloudWatchAgent"
                    ]
                  }
                ]
              }
            },
            "files": {
              "/opt/aws/amazon-cloudwatch-agent/bin/infra_config.json": {
                "source": {
                  "Fn::FindInMap": [
                    "StackMap",
                    "Nginx",
                    "InfraConfig"
                  ]
                },
                "mode": "000644",
                "owner": "root",
                "group": "root"
              },
              "/opt/aws/amazon-cloudwatch-agent/bin/nginx_config.json": {
                "source": {
                  "Fn::FindInMap": [
                    "StackMap",
                    "Nginx",
                    "NginxConfig"
                  ]
                },
                "mode": "000644",
                "owner": "root",
                "group": "root"
              },
              "/etc/nginx/nginx.conf": {
                "source": {
                  "Fn::FindInMap": [
                    "StackMap",
                    "Nginx",
                    "httpdConfig"
                  ]
                },
                "mode": "000644",
                "owner": "root",
                "group": "root"
              }
            },
            "commands": {
              "000": {
                "command": "amazon-linux-extras install -y nginx1"
              }
            },
            "services": {
              "sysvinit": {
                "nginx": {
                  "enabled": true,
                  "ensureRunning": true,
                  "commands": [
                    "000"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "NginxDemoEC2LaunchTemplate7F0CED0D": {
      "Type": "AWS::EC2::LaunchTemplate",
      "Properties": {
        "LaunchTemplateData": {
          "MetadataOptions": {
            "HttpTokens": "required"
          }
        },
        "LaunchTemplateName": "NginxDemoEC2LaunchTemplate"
      },
      "Metadata": {
        "aws:cdk:path": "CW-Monitoring-Framework-Stack/Nginx-Demo-Stack/NginxDemoEC2/LaunchTemplate"
      }
    },
    "CDKMetadata": {
      "Type": "AWS::CDK::Metadata",
      "Properties": {
        "Analytics": "v2:deflate64:H4sIAAAAAAAA/1WQwW7CMAyGn4V7yFh32HZESENIsFUFcZ3c1BRDGleJswpVffepFOh28uffln/biX5/1bMJNGFqivPUUq7bTwyCxVbAnNXi4DZQ1+RKBU34btEkut3Xpi/s04VKY27JbGPuUHptpIyj4A5yi6M+avMQ2BAIsXs097Bygt6hLEGwgcvN5pbNRcAcK3SiPiw3ay77+h23aKInuSw9x/rq+U9YuSDgzM1l5DVEZ447rGoLgp2yXAbdrrl8zLlzpwgq3WY8nHSNKVsy1zVHuk9PPR/IYtepDANHP/il4KFCQd8nX1HqOLzrT8uCXUH9azrluEB9Ck8/z286memXySkQTX10QhXqbIi/XkJLGMUBAAA="
      },
      "Metadata": {
        "aws:cdk:path": "CW-Monitoring-Framework-Stack/Nginx-Demo-Stack/CDKMetadata/Default"
      },
      "Condition": "CDKMetadataAvailable"
    }
  },
  "Parameters": {
    "SsmParameterValueawsserviceamiamazonlinuxlatestamzn2amikernel510hvmx8664gp2C96584B6F00A464EAD1953AFF4B05118Parameter": {
      "Type": "AWS::SSM::Parameter::Value<AWS::EC2::Image::Id>",
      "Default": "/aws/service/ami-amazon-linux-latest/amzn2-ami-kernel-5.10-hvm-x86_64-gp2"
    }
  },
  "Outputs": {
    "WebURL": {
      "Description": "URL for nginx demo server",
      "Value": {
        "Fn::Join": [
          "",
          [
            "http://",
            {
              "Fn::GetAtt": [
                "NginxDemoEC21F74A6F3",
                "PublicIp"
              ]
            }
          ]
        ]
      }
    }
  },
  "Conditions": {
    "CDKMetadataAvailable": {
      "Fn::Or": [
        {
          "Fn::Or": [
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "af-south-1"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "ap-east-1"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "ap-northeast-1"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "ap-northeast-2"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "ap-south-1"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "ap-southeast-1"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "ap-southeast-2"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "ca-central-1"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "cn-north-1"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "cn-northwest-1"
              ]
            }
          ]
        },
        {
          "Fn::Or": [
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "eu-central-1"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "eu-north-1"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "eu-south-1"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "eu-west-1"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "eu-west-2"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "eu-west-3"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "me-south-1"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "sa-east-1"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "us-east-1"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "us-east-2"
              ]
            }
          ]
        },
        {
          "Fn::Or": [
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "us-west-1"
              ]
            },
            {
              "Fn::Equals": [
                {
                  "Ref": "AWS::Region"
                },
                "us-west-2"
              ]
            }
          ]
        }
      ]
    }
  }
}