All Products
Search
Document Center

Elastic Compute Service:delete a security group

Last Updated:Mar 15, 2024

You can delete security groups that are no longer needed. When a security group is deleted, the rules in the security group are also deleted. This topic describes how to delete a security group in the Elastic Compute Service (ECS) console.

Prerequisites

  • The security group that you want to delete does not contain ECS instances or elastic network interfaces (ENIs). If the security group contains ECS instances or ENIs, you cannot delete the security group. Move the ECS instances or ENIs out of the security group before you can delete the security group. For more information, see Manage ECS instances in a security group or Manage ENIs in a security group.

  • The security group that you want to delete is not referenced as an authorization object by security group rules in other security groups. If the security group is referenced as an authorization object by security group rules in other security groups, you cannot delete the security group. Delete the security group rules before you delete the security group. For more information, see Delete a security group rule.

Procedure

  1. Log on to the ECS console.

  2. In the left-side navigation pane, choose Network & Security > Security Groups.

  3. In the top navigation bar, select the region and resource group to which the resource belongs. 地域

  4. On the security group list page, delete one or more security groups.

    • To delete a single security group, find the security group and click Delete in the Operation column.

    • To delete one or more security groups at a time, select the security groups and click Batch Delete in the lower part of the page.

  5. In the Delete Security Group message, confirm the information and click Confirm.

References

You can also call the following API operation to delete security groups: DeleteSecurityGroup.