aws-samples / aws-secure-environment-accelerator

The AWS Secure Environment Accelerator is a tool designed to help deploy and operate secure multi-account, multi-region AWS environments on an ongoing basis. The power of the solution is the configuration file which enables the completely automated deployment of customizable architectures within AWS without changing a single line of code.
Apache License 2.0
725 stars 233 forks source link

[FEATURE] Add networking support for AWS Outposts, Local Zones, and Wavelength Zones #963

Closed Brian969 closed 2 years ago

Brian969 commented 2 years ago

Describe the solution you'd like

Describe alternatives you've considered

Narrative

Overall solution architecture

The below diagram (lower portion) documents the Outpost account, the Outpost, the Dev Outpost VPC, the recommended subnet layouts, etc. image

Details

Example CFN Stacks For Each of the above new activities:

Stack1 - Associate LGW to VPC (via the LGW-RT):

{
  "Resources": {
  "teststack1association": {
    "Type": "AWS::EC2::LocalGatewayRouteTableVPCAssociation",
    "Properties": {
      "LocalGatewayRouteTableId": "lgw-rtb-0aeee54ea969f0f11",
      "VpcId": "vpc-0963ea3ebdb560a2b",
      "Tags": [
        {
          "Key": "Accelerator",
          "Value": "ASEA"
        }
      ]
    }
  }
}
}

Stack2 - Add Route Table Entry Pointing to LGW:

{
    "Resources": {
"Teststack1": {
    "Type": "AWS::EC2::Route",
    "Properties": {
      "RouteTableId": "rtb-05da8adedf93db128",
      "DestinationCidrBlock": "192.168.1.0/24",
      "LocalGatewayId": "lgw-0cdc67d1ae2c86ff8"
    }
  }
}
}

Stack3 - Create Outpost Subnet:

{
  "Resources": {
    "TestSubnet": {
        "Type": "AWS::EC2::Subnet",
        "Properties": {
          "CidrBlock": "10.250.0.196/27",
          "VpcId": "vpc-0963ea3ebdb560a2b",
          "AvailabilityZone": "us-west-2a",
          "OutpostArn": "arn:aws:outposts:us-west-2:123456789012:outpost/op-0e56dade1930688c7",
          "Tags": [
            {
              "Key": "Accelerator",
              "Value": "ASEA"
            },
            {
              "Key": "Name",
              "Value": "My-Outpost-Subnet"
            }
          ]
        }
      }
  }
}
rverma-dev commented 2 years ago

Can we also include the capability of edge-association for the route tables?

Brian969 commented 2 years ago

Hi, Can you elaborate on what you mean by edge-association? This PR (which is code complete) supports targeting any supported object type from a VPC route table, whether created by the ASEA or not. (i.e. 'egressOnlyInternetGatewayId', 'gatewayId', 'instanceId', 'localGatewayId', 'natGatewayId', 'networkInterfaceId', 'transitGatewayId', 'vpcEndpointId', 'vpcPeeringConnectionId',).