Delete a subnet - Amazon Virtual Private Cloud
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Delete a subnet

If you no longer need a subnet, you can delete it. You cannot delete a subnet if it contains any network interfaces. For example, you must terminate any instances in a subnet before you can delete it.

To delete a subnet using the console
  1. Open the Amazon EC2 console at https://console.amazonaws.cn/ec2/.

  2. Terminate all instances in the subnet. For more information, see Terminate your instance in the Amazon EC2 User Guide.

  3. Open the Amazon VPC console at https://console.amazonaws.cn/vpc/.

  4. In the navigation pane, choose Subnets.

  5. Select the subnet and choose Actions, Delete subnet.

  6. When prompted for confirmation, type delete and then choose Delete.

To delete a subnet using the Amazon CLI

Use the delete-subnet command.