本架构包含VPC简单架构,于2020年2月27日编写并测试可用。架构中拥有VPC一个,内含公有子网、私有子网各2个,其中,公有子网流量通过IGW互联网网关通信,私有子网通过NAT与外界网络通信(NAT已绑定EIP),路由表分为公有子网路由表(table1)和私有子网路由表(table2),均含route。特此记录,供后期使用!

以下为本文CloudFormation的架构图。
CloudFormation图示

特别链接AWS分类文档-点击查看

{
    "AWSTemplateFormatVersion": "2010-09-09",
    "Metadata": {
        "AWS::CloudFormation::Designer": {
            "3e25d4c6-7304-4a63-bcaa-de5179022661": {
                "size": {
                    "width": 960,
                    "height": 540
                },
                "position": {
                    "x": 200,
                    "y": 40
                },
                "z": 1,
                "embeds": [
                    "66e0a33b-2b4f-4364-8a3d-5bd103996d3e",
                    "697ffaa8-24ed-4a2b-85a8-50941209c9e0",
                    "f337b058-46ee-4d9f-9081-67f56076c75a",
                    "025ce2d9-c1ac-481f-bfa2-b8548ce14496"
                ]
            },
            "025ce2d9-c1ac-481f-bfa2-b8548ce14496": {
                "size": {
                    "width": 320,
                    "height": 190
                },
                "position": {
                    "x": 260,
                    "y": 90
                },
                "z": 2,
                "parent": "3e25d4c6-7304-4a63-bcaa-de5179022661",
                "embeds": [],
                "iscontainedinside": [
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661"
                ]
            },
            "f337b058-46ee-4d9f-9081-67f56076c75a": {
                "size": {
                    "width": 280,
                    "height": 200
                },
                "position": {
                    "x": 270,
                    "y": 330
                },
                "z": 2,
                "parent": "3e25d4c6-7304-4a63-bcaa-de5179022661",
                "embeds": [],
                "iscontainedinside": [
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661"
                ]
            },
            "55dd8fc2-2b32-42ab-84d9-56526319c3e3": {
                "size": {
                    "width": 60,
                    "height": 60
                },
                "position": {
                    "x": -170,
                    "y": 200
                },
                "z": 2,
                "parent": "2771ba2b-095f-4d6e-b8ba-460576692c2d",
                "embeds": [],
                "isassociatedwith": [
                    "0dee875a-3fcc-4cfd-997b-e58419b7d2d3"
                ],
                "iscontainedinside": [
                    "2771ba2b-095f-4d6e-b8ba-460576692c2d",
                    "2771ba2b-095f-4d6e-b8ba-460576692c2d",
                    "2771ba2b-095f-4d6e-b8ba-460576692c2d",
                    "2771ba2b-095f-4d6e-b8ba-460576692c2d",
                    "2771ba2b-095f-4d6e-b8ba-460576692c2d",
                    "2771ba2b-095f-4d6e-b8ba-460576692c2d",
                    "2771ba2b-095f-4d6e-b8ba-460576692c2d",
                    "2771ba2b-095f-4d6e-b8ba-460576692c2d",
                    "2771ba2b-095f-4d6e-b8ba-460576692c2d",
                    "2771ba2b-095f-4d6e-b8ba-460576692c2d",
                    "2771ba2b-095f-4d6e-b8ba-460576692c2d",
                    "2771ba2b-095f-4d6e-b8ba-460576692c2d",
                    "2771ba2b-095f-4d6e-b8ba-460576692c2d",
                    "2771ba2b-095f-4d6e-b8ba-460576692c2d",
                    "2771ba2b-095f-4d6e-b8ba-460576692c2d",
                    "2771ba2b-095f-4d6e-b8ba-460576692c2d",
                    "2771ba2b-095f-4d6e-b8ba-460576692c2d",
                    "2771ba2b-095f-4d6e-b8ba-460576692c2d",
                    "2771ba2b-095f-4d6e-b8ba-460576692c2d",
                    "2771ba2b-095f-4d6e-b8ba-460576692c2d",
                    "2771ba2b-095f-4d6e-b8ba-460576692c2d",
                    "2771ba2b-095f-4d6e-b8ba-460576692c2d",
                    "2771ba2b-095f-4d6e-b8ba-460576692c2d",
                    "2771ba2b-095f-4d6e-b8ba-460576692c2d",
                    "2771ba2b-095f-4d6e-b8ba-460576692c2d",
                    "2771ba2b-095f-4d6e-b8ba-460576692c2d",
                    "2771ba2b-095f-4d6e-b8ba-460576692c2d",
                    "2771ba2b-095f-4d6e-b8ba-460576692c2d",
                    "2771ba2b-095f-4d6e-b8ba-460576692c2d"
                ]
            },
            "2771ba2b-095f-4d6e-b8ba-460576692c2d": {
                "size": {
                    "width": 270,
                    "height": 180
                },
                "position": {
                    "x": -280,
                    "y": 140
                },
                "z": 1,
                "embeds": [
                    "55dd8fc2-2b32-42ab-84d9-56526319c3e3"
                ],
                "iscontainedinside": [
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661"
                ]
            },
            "0dee875a-3fcc-4cfd-997b-e58419b7d2d3": {
                "size": {
                    "width": 60,
                    "height": 60
                },
                "position": {
                    "x": 650,
                    "y": 720
                },
                "z": 1,
                "embeds": []
            },
            "cf1d3d6e-57ce-4907-9d07-0e69738d9d67": {
                "source": {
                    "id": "3e25d4c6-7304-4a63-bcaa-de5179022661"
                },
                "target": {
                    "id": "0dee875a-3fcc-4cfd-997b-e58419b7d2d3"
                },
                "z": 1
            },
            "8d6a55d2-67d0-4a28-b466-ba9669eb1976": {
                "size": {
                    "width": 60,
                    "height": 60
                },
                "position": {
                    "x": 590,
                    "y": -40
                },
                "z": 0,
                "embeds": [],
                "iscontainedinside": [
                    "025ce2d9-c1ac-481f-bfa2-b8548ce14496",
                    "025ce2d9-c1ac-481f-bfa2-b8548ce14496",
                    "025ce2d9-c1ac-481f-bfa2-b8548ce14496",
                    "025ce2d9-c1ac-481f-bfa2-b8548ce14496",
                    "025ce2d9-c1ac-481f-bfa2-b8548ce14496",
                    "025ce2d9-c1ac-481f-bfa2-b8548ce14496",
                    "025ce2d9-c1ac-481f-bfa2-b8548ce14496",
                    "025ce2d9-c1ac-481f-bfa2-b8548ce14496",
                    "025ce2d9-c1ac-481f-bfa2-b8548ce14496",
                    "025ce2d9-c1ac-481f-bfa2-b8548ce14496",
                    "025ce2d9-c1ac-481f-bfa2-b8548ce14496",
                    "025ce2d9-c1ac-481f-bfa2-b8548ce14496",
                    "025ce2d9-c1ac-481f-bfa2-b8548ce14496",
                    "025ce2d9-c1ac-481f-bfa2-b8548ce14496",
                    "025ce2d9-c1ac-481f-bfa2-b8548ce14496",
                    "025ce2d9-c1ac-481f-bfa2-b8548ce14496",
                    "025ce2d9-c1ac-481f-bfa2-b8548ce14496",
                    "025ce2d9-c1ac-481f-bfa2-b8548ce14496",
                    "025ce2d9-c1ac-481f-bfa2-b8548ce14496",
                    "025ce2d9-c1ac-481f-bfa2-b8548ce14496",
                    "025ce2d9-c1ac-481f-bfa2-b8548ce14496",
                    "025ce2d9-c1ac-481f-bfa2-b8548ce14496",
                    "025ce2d9-c1ac-481f-bfa2-b8548ce14496",
                    "025ce2d9-c1ac-481f-bfa2-b8548ce14496",
                    "025ce2d9-c1ac-481f-bfa2-b8548ce14496",
                    "025ce2d9-c1ac-481f-bfa2-b8548ce14496",
                    "025ce2d9-c1ac-481f-bfa2-b8548ce14496",
                    "025ce2d9-c1ac-481f-bfa2-b8548ce14496"
                ]
            },
            "edfcc2cc-9a35-494e-80fd-656b7f7c4fab": {
                "size": {
                    "width": 60,
                    "height": 60
                },
                "position": {
                    "x": 590,
                    "y": -200
                },
                "z": 1,
                "embeds": []
            },
            "6b58060d-333d-4289-9b6b-baab186de9a0": {
                "source": {
                    "id": "2771ba2b-095f-4d6e-b8ba-460576692c2d"
                },
                "target": {
                    "id": "025ce2d9-c1ac-481f-bfa2-b8548ce14496"
                },
                "z": 2
            },
            "ba41df21-e257-4aa8-a7de-bae8b19d879c": {
                "size": {
                    "width": 150,
                    "height": 150
                },
                "position": {
                    "x": 1520,
                    "y": 300
                },
                "z": 1,
                "embeds": [
                    "1545bc6e-0787-4f7e-a972-e6e739706dbd"
                ],
                "iscontainedinside": [
                    "3e25d4c6-7304-4a63-bcaa-de5179022661"
                ]
            },
            "1545bc6e-0787-4f7e-a972-e6e739706dbd": {
                "size": {
                    "width": 60,
                    "height": 60
                },
                "position": {
                    "x": 1550,
                    "y": 330
                },
                "z": 2,
                "parent": "ba41df21-e257-4aa8-a7de-bae8b19d879c",
                "embeds": [],
                "isassociatedwith": [
                    "0dee875a-3fcc-4cfd-997b-e58419b7d2d3",
                    "8d6a55d2-67d0-4a28-b466-ba9669eb1976"
                ],
                "iscontainedinside": [
                    "ba41df21-e257-4aa8-a7de-bae8b19d879c",
                    "ba41df21-e257-4aa8-a7de-bae8b19d879c",
                    "ba41df21-e257-4aa8-a7de-bae8b19d879c",
                    "ba41df21-e257-4aa8-a7de-bae8b19d879c",
                    "ba41df21-e257-4aa8-a7de-bae8b19d879c",
                    "ba41df21-e257-4aa8-a7de-bae8b19d879c",
                    "ba41df21-e257-4aa8-a7de-bae8b19d879c",
                    "ba41df21-e257-4aa8-a7de-bae8b19d879c",
                    "ba41df21-e257-4aa8-a7de-bae8b19d879c",
                    "ba41df21-e257-4aa8-a7de-bae8b19d879c",
                    "ba41df21-e257-4aa8-a7de-bae8b19d879c",
                    "ba41df21-e257-4aa8-a7de-bae8b19d879c",
                    "ba41df21-e257-4aa8-a7de-bae8b19d879c",
                    "ba41df21-e257-4aa8-a7de-bae8b19d879c",
                    "ba41df21-e257-4aa8-a7de-bae8b19d879c",
                    "ba41df21-e257-4aa8-a7de-bae8b19d879c",
                    "ba41df21-e257-4aa8-a7de-bae8b19d879c",
                    "ba41df21-e257-4aa8-a7de-bae8b19d879c",
                    "ba41df21-e257-4aa8-a7de-bae8b19d879c"
                ]
            },
            "2ec90b1d-7bc1-40a6-9223-478ba6824706": {
                "source": {
                    "id": "2771ba2b-095f-4d6e-b8ba-460576692c2d"
                },
                "target": {
                    "id": "f337b058-46ee-4d9f-9081-67f56076c75a"
                },
                "z": 2
            },
            "697ffaa8-24ed-4a2b-85a8-50941209c9e0": {
                "size": {
                    "width": 320,
                    "height": 230
                },
                "position": {
                    "x": 810,
                    "y": 60
                },
                "z": 2,
                "parent": "3e25d4c6-7304-4a63-bcaa-de5179022661",
                "embeds": [],
                "iscontainedinside": [
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661"
                ]
            },
            "66e0a33b-2b4f-4364-8a3d-5bd103996d3e": {
                "size": {
                    "width": 300,
                    "height": 230
                },
                "position": {
                    "x": 820,
                    "y": 320
                },
                "z": 2,
                "parent": "3e25d4c6-7304-4a63-bcaa-de5179022661",
                "embeds": [],
                "iscontainedinside": [
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661",
                    "3e25d4c6-7304-4a63-bcaa-de5179022661"
                ]
            },
            "533f617f-ef32-4d3a-8941-da0b2a61c25b": {
                "source": {
                    "id": "ba41df21-e257-4aa8-a7de-bae8b19d879c"
                },
                "target": {
                    "id": "66e0a33b-2b4f-4364-8a3d-5bd103996d3e"
                },
                "z": 2
            },
            "72f79c8e-56f5-4444-af5d-38370c8d93be": {
                "source": {
                    "id": "ba41df21-e257-4aa8-a7de-bae8b19d879c"
                },
                "target": {
                    "id": "697ffaa8-24ed-4a2b-85a8-50941209c9e0"
                },
                "z": 2
            }
        }
    },
    "Resources": {
        "vpcdemo": {
            "Type": "AWS::EC2::VPC",
            "Properties": {
                "CidrBlock": "10.0.0.0/16",
                "Tags": [
                    {
                        "Key": "Name",
                        "Value": "vpcdemo"
                    }
                ]
            },
            "Metadata": {
                "AWS::CloudFormation::Designer": {
                    "id": "3e25d4c6-7304-4a63-bcaa-de5179022661"
                }
            }
        },
        "pubnet1": {
            "Type": "AWS::EC2::Subnet",
            "Properties": {
                "AvailabilityZone": {
                    "Fn::Select": [
                        "0",
                        {
                            "Fn::GetAZs": ""
                        }
                    ]
                },
                "CidrBlock": "10.0.1.0/24",
                "Tags": [
                    {
                        "Key": "Name",
                        "Value": "pubnet1"
                    }
                ],
                "VpcId": {
                    "Ref": "vpcdemo"
                }
            },
            "Metadata": {
                "AWS::CloudFormation::Designer": {
                    "id": "025ce2d9-c1ac-481f-bfa2-b8548ce14496"
                }
            }
        },
        "pubnet2": {
            "Type": "AWS::EC2::Subnet",
            "Properties": {
                "AvailabilityZone": {
                    "Fn::Select": [
                        "1",
                        {
                            "Fn::GetAZs": ""
                        }
                    ]
                },
                "CidrBlock": "10.0.2.0/24",
                "Tags": [
                    {
                        "Key": "Name",
                        "Value": "pubnet2"
                    }
                ],
                "VpcId": {
                    "Ref": "vpcdemo"
                }
            },
            "Metadata": {
                "AWS::CloudFormation::Designer": {
                    "id": "f337b058-46ee-4d9f-9081-67f56076c75a"
                }
            }
        },
        "route1": {
            "Type": "AWS::EC2::Route",
            "Properties": {
                "DestinationCidrBlock": "0.0.0.0/0",
                "GatewayId": {
                    "Ref": "IGW"
                },
                "RouteTableId": {
                    "Ref": "table1"
                }
            },
            "Metadata": {
                "AWS::CloudFormation::Designer": {
                    "id": "55dd8fc2-2b32-42ab-84d9-56526319c3e3"
                }
            }
        },
        "table1": {
            "Type": "AWS::EC2::RouteTable",
            "Properties": {
                "Tags": [
                    {
                        "Key": "Name",
                        "Value": "table1"
                    }
                ],
                "VpcId": {
                    "Ref": "vpcdemo"
                }
            },
            "Metadata": {
                "AWS::CloudFormation::Designer": {
                    "id": "2771ba2b-095f-4d6e-b8ba-460576692c2d"
                }
            }
        },
        "table2": {
            "Type": "AWS::EC2::RouteTable",
            "Properties": {
                "Tags": [
                    {
                        "Key": "Name",
                        "Value": "table2"
                    }
                ],
                "VpcId": {
                    "Ref": "vpcdemo"
                }
            },
            "Metadata": {
                "AWS::CloudFormation::Designer": {
                    "id": "ba41df21-e257-4aa8-a7de-bae8b19d879c"
                }
            }
        },
        "route2": {
            "Type": "AWS::EC2::Route",
            "Properties": {
                "DestinationCidrBlock": "0.0.0.0/0",
                "NatGatewayId": {
                    "Ref": "nat1"
                },
                "RouteTableId": {
                    "Ref": "table2"
                }
            },
            "Metadata": {
                "AWS::CloudFormation::Designer": {
                    "id": "1545bc6e-0787-4f7e-a972-e6e739706dbd"
                }
            }
        },
        "IGW": {
            "Type": "AWS::EC2::InternetGateway",
            "Properties": {},
            "Metadata": {
                "AWS::CloudFormation::Designer": {
                    "id": "0dee875a-3fcc-4cfd-997b-e58419b7d2d3"
                }
            }
        },
        "igwvpc": {
            "Type": "AWS::EC2::VPCGatewayAttachment",
            "Properties": {
                "InternetGatewayId": {
                    "Ref": "IGW"
                },
                "VpcId": {
                    "Ref": "vpcdemo"
                }
            },
            "Metadata": {
                "AWS::CloudFormation::Designer": {
                    "id": "cf1d3d6e-57ce-4907-9d07-0e69738d9d67"
                }
            }
        },
        "netRoute1": {
            "Type": "AWS::EC2::SubnetRouteTableAssociation",
            "Properties": {
                "SubnetId": {
                    "Ref": "pubnet1"
                },
                "RouteTableId": {
                    "Ref": "table1"
                }
            },
            "Metadata": {
                "AWS::CloudFormation::Designer": {
                    "id": "6b58060d-333d-4289-9b6b-baab186de9a0"
                }
            }
        },
        "netRoute2": {
            "Type": "AWS::EC2::SubnetRouteTableAssociation",
            "Properties": {
                "SubnetId": {
                    "Ref": "pubnet2"
                },
                "RouteTableId": {
                    "Ref": "table1"
                }
            },
            "Metadata": {
                "AWS::CloudFormation::Designer": {
                    "id": "2ec90b1d-7bc1-40a6-9223-478ba6824706"
                }
            }
        },
        "netRoute3": {
            "Type": "AWS::EC2::SubnetRouteTableAssociation",
            "Properties": {
                "SubnetId": {
                    "Ref": "prinet1"
                },
                "RouteTableId": {
                    "Ref": "table2"
                }
            },
            "Metadata": {
                "AWS::CloudFormation::Designer": {
                    "id": "72f79c8e-56f5-4444-af5d-38370c8d93be"
                }
            }
        },
        "netRoute4": {
            "Type": "AWS::EC2::SubnetRouteTableAssociation",
            "Properties": {
                "SubnetId": {
                    "Ref": "prinet2"
                },
                "RouteTableId": {
                    "Ref": "table2"
                }
            },
            "Metadata": {
                "AWS::CloudFormation::Designer": {
                    "id": "533f617f-ef32-4d3a-8941-da0b2a61c25b"
                }
            }
        },
        "nat1": {
            "Type": "AWS::EC2::NatGateway",
            "Properties": {
                "AllocationId": {
                    "Fn::GetAtt": [
                        "eip1",
                        "AllocationId"
                    ]
                },
                "SubnetId": {
                    "Ref": "pubnet1"
                }
            },
            "Metadata": {
                "AWS::CloudFormation::Designer": {
                    "id": "8d6a55d2-67d0-4a28-b466-ba9669eb1976"
                }
            }
        },
        "eip1": {
            "Type": "AWS::EC2::EIP",
            "Properties": {},
            "Metadata": {
                "AWS::CloudFormation::Designer": {
                    "id": "edfcc2cc-9a35-494e-80fd-656b7f7c4fab"
                }
            }
        },
        "prinet1": {
            "Type": "AWS::EC2::Subnet",
            "Properties": {
                "AvailabilityZone": {
                    "Fn::Select": [
                        "0",
                        {
                            "Fn::GetAZs": ""
                        }
                    ]
                },
                "CidrBlock": "10.0.3.0/24",
                "Tags": [
                    {
                        "Key": "Name",
                        "Value": "prinet1"
                    }
                ],
                "VpcId": {
                    "Ref": "vpcdemo"
                }
            },
            "Metadata": {
                "AWS::CloudFormation::Designer": {
                    "id": "697ffaa8-24ed-4a2b-85a8-50941209c9e0"
                }
            }
        },
        "prinet2": {
            "Type": "AWS::EC2::Subnet",
            "Properties": {
                "AvailabilityZone": {
                    "Fn::Select": [
                        "1",
                        {
                            "Fn::GetAZs": ""
                        }
                    ]
                },
                "CidrBlock": "10.0.4.0/24",
                "Tags": [
                    {
                        "Key": "Name",
                        "Value": "prinet2"
                    }
                ],
                "VpcId": {
                    "Ref": "vpcdemo"
                }
            },
            "Metadata": {
                "AWS::CloudFormation::Designer": {
                    "id": "66e0a33b-2b4f-4364-8a3d-5bd103996d3e"
                }
            }
        }
    }
}
最后修改:2023 年 06 月 16 日
分享是对我最大的赞赏