AWS::EC2::RouteSpecifies a route in a route table. For more information, see [Routes](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html#route-table-routes) in the *Amazon VPC User Guide*. You must specify either a destination CIDR block or prefix list ID. You must also specify exactly one of the resources as the target. If you create a route that references a transit gateway in the same template where you create the transit gateway, you must declare a dependency on the transit gateway...
15 configurable properties. 1 required. Click a row to see details.
| Property | Type | Flags |
|---|---|---|
RouteTableId | string | RequiredCreate-only |
CarrierGatewayId | string | |
CoreNetworkArn | string | |
DestinationCidrBlock | string | Create-only |
DestinationIpv6CidrBlock | string | Create-only |
DestinationPrefixListId | string | Create-only |
EgressOnlyInternetGatewayId | string | |
GatewayId | string | |
InstanceId | string | |
LocalGatewayId | string | |
NatGatewayId | string | |
NetworkInterfaceId | string | |
TransitGatewayId | string | |
VpcEndpointId | string | |
VpcPeeringConnectionId | string |
Values returned after the resource is created. Access these with Fn::GetAtt.
| Attribute | Type | Description |
|---|---|---|
CidrBlock | string | - |
A minimal template with required properties and common optional ones.
AWSTemplateFormatVersion: "2010-09-09"
Description: Sample template for AWS::EC2::Route
Resources:
MyResource:
Type: AWS::EC2::Route
Properties:
RouteTableId: "my-routetableid"Permissions CloudFormation needs in your IAM role to manage this resource.
ec2:CreateRouteec2:DescribeRouteTablesec2:DescribeNetworkInterfacesec2:DescribeRouteTablesec2:ReplaceRouteec2:DescribeRouteTablesec2:DescribeNetworkInterfacesec2:DeleteRouteec2:DescribeRouteTablesec2:DescribeRouteTablesEverything you need to know about EC2 on one page. HD quality, print-friendly.
Download Free InfographicRouteTableIdThese properties cannot be changed after the resource is created. Updating them triggers a replacement.
RouteTableIdDestinationCidrBlockDestinationIpv6CidrBlockDestinationPrefixListId