Clone route table

AWS clone VPC route table and routes.



routeTableID=$(aws ec2 create-route-table --region REGION --vpc-id vpc-XXXXXXXX --output text | grep "^ROUTETABLE" | cut -f2)
echo "Route table: $routeTableID"

aws ec2 create-route --region REGION --route-table-id $routeTableID --destination-cidr-block --gateway-id igw-XXXXXXXX
aws ec2 create-route --region REGION --route-table-id $routeTableID --destination-cidr-block x.x.x.x/24 ----vpc-peering-connection-id pcx-XXXXXXXX

Vote Here

You must earn at least 1 vote on your snippets to be allowed to vote

Terms Of Use

Privacy Policy

Featured snippets are MIT license

Gears & Masters

Advertise © 2020