AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::EC2::RouteTable

CfnRouteTable

Specifies a route table for the specified VPC. After you create a route table, you can add routes and associate the table with a subnet. For more information, see [Route tables](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html) in the *Amazon VPC User Guide* .

Import

import { CfnRouteTable } from 'aws-cdk-lib/aws-ec2';

Or use the module namespace:

import * as ec2 from 'aws-cdk-lib/aws-ec2';
// ec2.CfnRouteTable

Properties

Configuration passed to the constructor as CfnRouteTableProps.

vpcIdRequired
string | IVPCRef

The ID of the VPC.

tagsOptional
CfnTag[]

Any tags assigned to the route table.

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Get the Amazon EC2 Cheat Sheet

Everything you need to know about Amazon EC2 on one page. HD quality, print-friendly.

Download Free Infographic