You can delete security groups that you no longer require. Deleting a security group also deletes all its corresponding rules.
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.
To delete a security group, follow these steps:
- Log on to the ECS console.
- In the left-side navigation pane, click .
- Select the target region.
- Select one or more security groups, and click Delete.
- In the displayed Delete Security Group dialog box, click OK.