AWS Fundamentals Logo
AWS Fundamentals
AWS::EC2::InternetGateway

EC2 InternetGateway

Allocates an internet gateway for use with a VPC. After creating the Internet gateway, you then attach it to a VPC.

Properties

1 configurable property. Click a row to see details.

Filter:
PropertyTypeFlags
Tags
Array<Tag>

Return Values

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

AttributeTypeDescription
InternetGatewayIdstring-

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

Resources:
  MyResource:
    Type: AWS::EC2::InternetGateway
    Properties:
      Tags:
        - Key: Environment
          Value: Production

Required IAM Permissions

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

create

ec2:CreateInternetGatewayec2:CreateTagsec2:DescribeInternetGateways

read

ec2:DescribeInternetGateways

delete

ec2:DeleteInternetGatewayec2:DescribeInternetGateways

update

ec2:DeleteTagsec2:CreateTagsec2:DescribeInternetGateways

list

ec2:DescribeInternetGateways

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
Properties2
Required0
TaggingSupported
Primary IDInternetGatewayId

Supported Operations

CreateReadDeleteUpdateList

External Links