Setting the Main Route Table

You can set the route table you want to use as the main one for the Net. This route table is then automatically applied to Subnets that are not explicitly associated with a route table.

Setting the Main Route Table Using AWS CLI

Before you begin: Install and configure AWS CLI. For more information, see Installing and Configuring AWS CLI.

To set a route table as main, use the replace-route-table-association command following this syntax:

Request sample
$ aws ec2 replace-route-table-association \
    --profile YOUR_PROFILE \
    --association-id rtbassoc-4321dcba \
    --route-table-id rtb-1234abcd \
    --endpoint https://fcu.eu-west-2.outscale.com

This command contains the following attributes that you need to specify:

The replace-route-table-association command returns the following element:

  • NewAssociationId: The new association ID.

Result sample
 {
    "NewAssociationId": "rtbassoc-abcd1234"
}

The route table is set as the main one for the VPC.

Related Pages

Corresponding API Method

AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.