aws ec2 create-route-table
Creates a route table for the specified VPC. AWS CLI reference
1 example 4 options Its page in the AWS CLI reference
Examples
To create a route table
The following create-route-table example creates a route table for the specified VPC.
aws ec2 create-route-table --vpc-id vpc-a01106c2Identify--vpc-idThe ID of the VPC.Its output
{
"RouteTable": {
"Associations": [],
"RouteTableId": "rtb-22574640",
"VpcId": "vpc-a01106c2",
"PropagatingVgws": [],
"Tags": [],
"Routes": [
{
"GatewayId": "local",
"DestinationCidrBlock": "10.0.0.0/16",
"State": "active"
}
]
}
}For more information, see Create a route table for your VPC in the Amazon VPC User Guide.
Options
--client-tokenUnique, case-sensitive identifier that you provide to ensure the idempotency of the request.--dry-runChecks whether you have the required permissions for the action, without actually making the request, and provides an error response.--tag-specificationsThe tags to assign to the route table.--vpc-idThe ID of the VPC.