AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::EC2::InternetGateway

CfnInternetGateway

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

Import

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

Or use the module namespace:

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

Properties

Configuration passed to the constructor as CfnInternetGatewayProps.

tagsOptional
CfnTag[]

Any tags to assign to the internet gateway.

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