Amazon Web Services (AWS) - Create Route Table using the AWS CLI

by
Jeremy Canfield |
Updated: February 25 2024
| Amazon Web Services (AWS) articles
This assumes you have already configured the aws command line tool. If not, check out my article on Getting Started with the AWS CLI.
The aws ec2 create-route-table command can be used to create a Route Table in one of your Virtual Private Clouds (VPC).
~]$ aws ec2 create-route-table --vpc-id vpc-0a9d4cb29e2748444
{
"RouteTable": {
"Associations": [],
"RouteTableId": "rtb-0e96e9343c4086863",
"VpcId": "vpc-0a9d4cb29e2748444",
"PropagatingVgws": [],
"Tags": [],
"Routes": [
{
"GatewayId": "local",
"DestinationCidrBlock": "10.0.0.0/24",
"State": "active",
"Origin": "CreateRouteTable"
}
],
"OwnerId": "123456789012"
}
}
By default, the Route Table should have a single target local route, which will allow communication between resources in the Virtual Private Cloud (VPC) but will not allow communcation out of the Virtual Private Cloud. In this example, the Route Table has a target local route with destination 10.0.0.0/24.
Did you find this article helpful?
If so, consider buying me a coffee over at