AWS Fundamentals Logo
AWS Fundamentals
AWS::EC2::GatewayRouteTableAssociation

EC2 GatewayRouteTableAssociation

Associates a gateway with a route table. The gateway and route table must be in the same VPC. This association causes the incoming traffic to the gateway to be routed according to the routes in the route table.

Properties

2 configurable properties. 2 required. Click a row to see details.

Filter:
PropertyTypeFlags
GatewayId
string
RequiredCreate-only
RouteTableId
string
Required

Return Values

Values returned after the resource is created. Access these with Fn::GetAtt.

AttributeTypeDescription
AssociationIdstringThe route table association ID.

Sample CloudFormation Template

A minimal template with required properties and common optional ones.

template.yaml
AWSTemplateFormatVersion: "2010-09-09"
Description: Sample template for AWS::EC2::GatewayRouteTableAssociation

Resources:
  MyResource:
    Type: AWS::EC2::GatewayRouteTableAssociation
    Properties:
      RouteTableId: "my-routetableid"
      GatewayId: "my-gatewayid"

Required IAM Permissions

Permissions CloudFormation needs in your IAM role to manage this resource.

create

ec2:DescribeRouteTablesec2:AssociateRouteTable

read

ec2:DescribeRouteTables

update

ec2:DescribeRouteTablesec2:ReplaceRouteTableAssociation

delete

ec2:DescribeRouteTablesec2:DisassociateRouteTable

Get the EC2 Cheat Sheet

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

Download Free Infographic

Quick Facts

ServiceEC2
Properties3
Required2
TaggingNot supported
Primary IDGatewayId

Supported Operations

CreateReadUpdateDelete

Immutable After Creation

These properties cannot be changed after the resource is created. Updating them triggers a replacement.

GatewayId

External Links