Route traffic through an AWS Transit Gateway network function attachment - Amazon VPC
Services or capabilities described in AWS documentation might vary by Region. To see the differences applicable to the AWS European Sovereign Cloud Region, see the AWS European Sovereign Cloud User Guide.

Route traffic through an AWS Transit Gateway network function attachment

After creating a network function attachment, associate it with a transit gateway route table and create static routes that send traffic to the attachment for inspection. Route propagation from a network function attachment is not supported. For information about route table associations, see Associate a transit gateway route table.

Route traffic through a network function attachment using the console

Use Amazon VPC Console to route traffic through a transit gateway network function attachment.

To route traffic through a network function attachment using the console
  1. Open the Amazon VPC console.

  2. In the navigation pane, choose Transit Gateways.

  3. Choose Transit gateway route tables.

  4. Select the route table you want to modify.

  5. Choose Actions, and then choose Create static route.

  6. For CIDR, enter the destination CIDR block for the route.

  7. For Attachment, select the network function attachment. For example, this might be an AWS Network Firewall attachment.

  8. Choose Create static route.

    Note

    Only static routes are supported.

Traffic matching the CIDR block is sent to the network function attachment for inspection.

Route traffic through a network function attachment using the CLI or API

Use the AWS CLI or API to route traffic through a transit gateway network function attachment.

To route traffic through a network function attachment using the command line or API
  • Use create-transit-gateway-route.

    The following example routes traffic to a network function attachment of type AWS Network Firewall:

    aws ec2 create-transit-gateway-route \ --transit-gateway-route-table-id tgw-rtb-0123456789abcdef0 \ --destination-cidr-block 0.0.0.0/0 \ --transit-gateway-attachment-id tgw-attach-0123456789abcdef0

    The output then returns:

    { "Route": { "DestinationCidrBlock": "0.0.0.0/0", "TransitGatewayAttachments": [ { "ResourceId": "network-firewall", "TransitGatewayAttachmentId": "tgw-attach-0123456789abcdef0", "ResourceType": "network-function" } ], "Type": "static", "State": "active" } }

Traffic matching the CIDR block is sent to the network function attachment for inspection.