ec2-delete-group

Description

Deletes a security group that you own.

[Note]Note

If you attempt to delete a security group that contains instances, a fault is returned.

If you attempt to delete a security group that is referenced by another security group, a fault is returned. For example, if security group B has a rule that allows access from security group A, security group A cannot be deleted until the allow rule is removed.

Syntax

ec2-delete-group group

Options

NameDescriptionRequired

group

Name of the security group to delete.

Type: String

Default: None

Example: websrv

Yes

Output

The command returns a table that contains the following information:

  • GROUP identifier

  • Name of the deleted security group

Amazon EC2 displays errors on stderr.

Examples

Example Request

This example deletes the websrv security group.

PROMPT> ec2-delete-group websrv
GROUP websrv