You can delete security groups that you no longer require. Deleting a security group also deletes all its corresponding rules.

Note

Before you delete a security group, note the following:

  • Make sure there are no ECS instances in the security group. For more information on how to move an ECS instance to another security group, see add to or remove from a security group.
  • Make sure the security groupis not referenced in the rules of another security group. You can delete a security group directly by following the steps described in this document. If the security group is authorized by another security group, error message shown in the following figure appears. If this occurs, you must delete the corresponding authorization rule.

Procedure

To delete a security group, follow these steps:

  1. Log on to the  ECS console.
  2. In the left-side navigation pane, click Networks and Security > Security Groups.
  3. Select the target region.
  4. Select one or more security groups, and click Delete.
  5. In the displayed Delete Security Group dialog box, click OK.

Related APIs