Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Delete an internet gateway

Focus mode
Delete an internet gateway - Amazon Virtual Private Cloud

If you no longer need internet access for a VPC, you can detach the internet gateway from the VPC and then delete it. You can't delete an internet gateway if it's still attached to a VPC. You can't detach an internet gateway if the VPC has resources with associated public IP addresses or Elastic IP addresses.

To detach an internet gateway from a VPC using the console
  1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/.

  2. In the navigation pane, choose Internet gateways.

  3. Select the check box for the internet gateway.

  4. To attach it, choose Actions, Attach to VPC, select an available VPC, and choose Attach internet gateway.

  5. To detach it, choose Actions, Detach from VPC and choose Detach internet gateway. When prompted for confirmation, choose Detach internet gateway.

To describe your internet gateways, including attachments, using the command line
To detach an internet gateway from a VPC using the command line
To delete an internet gateway using the console
  1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/.

  2. In the navigation pane, choose Internet gateways.

  3. Select the check box for the internet gateway.

  4. Choose Actions, Delete internet gateway.

  5. When prompted for confirmation, enter delete, and then choose Delete internet gateway.

To delete an internet gateway using the command line
PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.