Amazon Virtual Private Cloud
Transit Gateways

The AWS Documentation website is getting a new look!
Try it now and let us know what you think. Switch to the new look >>

You can return to the original look by selecting English in the language selector above.

Transit Gateway Attachments to a VPC

When you attach a VPC to a transit gateway, you must specify one subnet from each Availability Zone to be used by the transit gateway to route traffic. Specifying one subnet from an Availability Zone enables traffic to reach resources in every subnet in that Availability Zone.

Limits

When you attach a VPC to a transit gateway, resources in Availability Zones where there is no transit gateway attachment cannot reach the transit gateway. If there is a route to the transit gateway in a subnet route table, traffic is only forwarded to the transit gateway when the transit gateway has an attachment in a subnet in the same Availability Zone.

The resources in a VPC attached to a transit gateway cannot access the security groups of a different VPC that is also attached to the same transit gateway.

Create a Transit Gateway Attachment to a VPC

To create a VPC attachment using the console

  1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/.

  2. On the navigation pane, choose Transit Gateway Attachments.

  3. Choose Create Transit Gateway Attachment.

  4. For Transit Gateway ID, choose the transit gateway for the attachment. You can choose a transit gateway that you own or a transit gateway that was shared with you.

  5. For Attachment type, choose VPC.

  6. Under VPC Attachment, optionally type a name for Attachment name tag.

  7. Choose whether to enable DNS Support and IPv6 Support.

  8. For VPC ID, choose the VPC to attach to the transit gateway.

    This VPC must have at least one subnet associated with it.

  9. For Subnet IDs, select one subnet for each Availability Zone to be used by the transit gateway to route traffic. You must select at least one subnet. You can select only one subnet per Availability Zone.

  10. Choose Create attachment.

To create a VPC attachment using the AWS CLI

Use the create-transit-gateway-vpc-attachment command.

Modify Your VPC Attachment

To modify your VPC attachments using the console

  1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/.

  2. On the navigation pane, choose Transit Gateway Attachments.

  3. Select the VPC attachment, and then choose Actions, Modify.

  4. To enable DNS support, select DNS support.

  5. To add a subnet to the attachment, next to the subnet, select the box.

  6. Choose Modify attachment.

To modify your VPC attachments using the AWS CLI

Use the modify-transit-gateway-vpc-attachment command.

Modify Your VPC Attachment Tags

To modify your VPC attachment tags using the console

  1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/.

  2. On the navigation pane, choose Transit Gateway Attachments.

  3. Select the VPC attachment, and then choose Actions, Add/Edit tags.

  4. [Add a tag] Choose Add tag and do the following:

    • For Key, enter the key name.

    • For Value, enter the key value.

  5. [Remove a tag] Next to the tag, choose Delete ("X").

  6. Choose Modify attachment.

View Your VPC Attachments

To view your VPC attachments using the console

  1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/.

  2. On the navigation pane, choose Transit Gateway Attachments.

  3. Choose the search bar, select Resource type from the menu, and then select VPC.

  4. The VPC attachments are displayed. Choose an attachment to view its details.

To view your VPC attachments using the AWS CLI

Use the describe-transit-gateway-vpc-attachments command.

Delete a VPC Attachment

To delete a VPC attachment using the console

  1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/.

  2. On the navigation pane, choose Transit Gateway Attachments.

  3. Select the VPC attachment.

  4. Choose Actions, Delete.

  5. When prompted for confirmation, choose Delete.

To delete a VPC attachment using the AWS CLI

Use the delete-transit-gateway-vpc-attachment command.