Table Of Contents


User Guide

First time using the AWS CLI? See the User Guide for help getting started.

[ aws . ec2 ]



[IPv6 only] Creates 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.

See also: AWS API Documentation

See 'aws help' for descriptions of global parameters.


[--client-token <value>]
[--dry-run | --no-dry-run]
--vpc-id <value>
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]


--client-token (string)

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to Ensure Idempotency .

--dry-run | --no-dry-run (boolean)

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .

--vpc-id (string)

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

--cli-input-json (string) Performs service operation based on the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, the CLI values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

See 'aws help' for descriptions of global parameters.


To create an egress-only Internet gateway

This example creates an egress-only Internet gateway for the specified VPC.


aws ec2 create-egress-only-internet-gateway --vpc-id vpc-0c62a468


  "EgressOnlyInternetGateway": {
      "EgressOnlyInternetGatewayId": "eigw-015e0e244e24dfe8a",
      "Attachments": [
              "State": "attached",
              "VpcId": "vpc-0c62a468"


ClientToken -> (string)

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

EgressOnlyInternetGateway -> (structure)

Information about the egress-only internet gateway.

Attachments -> (list)

Information about the attachment of the egress-only internet gateway.


Describes the attachment of a VPC to an internet gateway or an egress-only internet gateway.

State -> (string)

The current state of the attachment. For an internet gateway, the state is available when attached to a VPC; otherwise, this value is not returned.

VpcId -> (string)

The ID of the VPC.

EgressOnlyInternetGatewayId -> (string)

The ID of the egress-only internet gateway.