AWS Fundamentals Logo
AWS Fundamentals
AWS::EC2::VPCGatewayAttachment

EC2 VPCGatewayAttachment

Resource Type definition for AWS::EC2::VPCGatewayAttachment

Properties

3 configurable properties. 1 required. Click a row to see details.

Filter:
PropertyTypeFlags
VpcId
string
RequiredCreate-only
InternetGatewayId
string
VpnGatewayId
string

Return Values

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

AttributeTypeDescription
AttachmentTypestringUsed to identify if this resource is an Internet Gateway or Vpn Gateway Attachment

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::VPCGatewayAttachment

Resources:
  MyResource:
    Type: AWS::EC2::VPCGatewayAttachment
    Properties:
      VpcId: "my-vpcid"

Required IAM Permissions

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

create

ec2:AttachInternetGatewayec2:AttachVpnGatewayec2:DescribeInternetGatewaysec2:DescribeVpnGateways

read

ec2:DescribeInternetGatewaysec2:DescribeVpnGateways

update

ec2:AttachInternetGatewayec2:AttachVpnGatewayec2:DetachInternetGatewayec2:DetachVpnGatewayec2:DescribeInternetGatewaysec2:DescribeVpnGateways

delete

ec2:DetachInternetGatewayec2:DetachVpnGatewayec2:DescribeInternetGatewaysec2:DescribeVpnGateways

list

ec2:DescribeInternetGatewaysec2:DescribeVpnGateways

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
Properties4
Required1
TaggingNot supported
Primary IDAttachmentType

Supported Operations

CreateReadUpdateDeleteList

Immutable After Creation

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

VpcId

External Links