Deleting an Internet Gateway

You can delete an Internet gateway that you no longer need.

Deleting an Internet Gateway Using Cockpit v1

Before you begin: Detach the Internet gateway from the Virtual Private Cloud (VPC). For more information, see Detaching an Internet Gateway from a VPC.

  1. Click VPC > Internet Gateways.

  2. Click the Internet gateway you want to delete.
    The Internet gateway is selected.

  3. Click Delete .
    A confirmation dialog box appears.

  4. Click Delete to validate.
    The Internet gateway is deleted and no longer appears on the Internet Gateways page.

Deleting an Internet Service Using Cockpit v2-beta

Before you begin: Unlink the Internet service from the Net. For more information, see Detaching an Internet Gateway from a VPC.

  1. Click inside the Internet Services dashboard to make checkboxes appear.

  2. Check the box of the Internet service you want to delete.
    The Internet service is selected and an action menu appears.

  3. Click IconTerminate Delete.
    A confirmation dialog box appears.

  4. Click Delete Internet Services to validate.
    The Internet service is deleted.

Deleting an Internet Gateway Using AWS CLI

Before you begin: Detach the Internet gateway from the VPC. For more information, see Detaching an Internet Gateway from a VPC.

To delete an Internet gateway, use the create-internet-gateway command following this syntax:

Request sample
$ aws ec2 delete-internet-gateway \
    --profile YOUR_PROFILE \
    --internet-gateway-id igw-12345678 \
    --endpoint https://fcu.eu-west-2.outscale.com

This command contains the following attributes that you need to specify:

  • (optional) profile: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI.

  • internet-gateway-id: The ID of the Internet gateway.

  • endpoint: The endpoint corresponding to the Region you want to send the request to.

The Internet gateway is deleted.

Related Page

Corresponding API Method

AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.