Amazon Web Services (AWS) - Attach Transit Gateway to a Virtual Private Cloud (VPC) using the AWS CLI

by
Jeremy Canfield |
Updated: May 15 2024
| Amazon Web Services (AWS) articles
If you are not familiar with Transit Gateways, check out my article Amazon Web Services (AWS) - Getting Started with Transit Gateway.
The aws ec2 create-transit-gateway-vpc-attachment command can be used to attach one of your Transit Gateways to one or more of your Virtual Private Clouds (VPCs).
aws ec2 create-transit-gateway-vpc-attachment \
--transit-gateway-id tgw-036b93068244418ff \
--vpc-id vpc-0f3854b1b6bf17549 \
--subnet-id subnet-0e45c1b3e9cdd1030
Give it a few minutes and the VPCs should be Available in the Transit Gateway Attachement.
Did you find this article helpful?
If so, consider buying me a coffee over at