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.
- A security group that contains Elastic Compute Service (ECS) instances or elastic network interfaces (ENIs) cannot be deleted. You must move the ECS instances or ENIs out of the security group before you can delete the security group. For information about how to move ECS instances or ENIs out of a security group, see Manage ECS instances in a security group or Manage ENIs in a security group.
- A security group that is referenced as an authorization object by rules in other security groups cannot be deleted. You must follow the on-screen instructions to delete the rules before you can delete the security group. For information about how to delete a security group rule, see Delete a security group rule.
- Log on to the ECS console.
- In the left-side navigation pane, choose .
- In the top navigation bar, select a region.
- On the Security Groups page, select one or more security groups and click Delete in the lower part of the page.
- In the Delete Security Group message, confirm the information and click OK.
For information about how to delete security groups by calling an API operation, see DeleteSecurityGroup.