AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::EC2::EgressOnlyInternetGateway

CfnEgressOnlyInternetGateway

[IPv6 only] Specifies an egress-only internet gateway for your VPC. An egress-only internet gateway is used to enable outbound communication over IPv6 from instances in your VPC to the internet, and prevents hosts outside of your VPC from initiating an IPv6 connection with your instance. For more information, see [Egress-only internet gateway](https://docs.aws.amazon.com/vpc/latest/userguide/egress-only-internet-gateway.html) in the *Amazon VPC User Guide* .

Import

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

Or use the module namespace:

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

Properties

Configuration passed to the constructor as CfnEgressOnlyInternetGatewayProps.

vpcIdRequired
string | IVPCRef

The ID of the VPC for which to create the egress-only internet gateway.

tagsOptional
CfnTag[]

The tags assigned to the egress-only 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