Skip to main content

EC2 Delete Security Group

Deletes a security group. If you attempt to delete a security group that is associated with an instance, or is referenced by another security group, the operation fails with InvalidGroup.InUse in EC2-Classic or DependencyViolation in EC2-VPC.

External Documentation

To learn more, visit the AWS documentation.

Basic Parameters

ParameterDescription
AWS RegionEnter the desired AWS Region.
If no Region is specified, and the requested service supports Regions, AWS routes the request to us-east-1 by default.
Group IDThe ID of the security group. Required for a nondefault VPC.
Group Name[EC2-Classic, default VPC] The name of the security group. You can specify either the security group name or the security group ID.

Advanced Parameters

ParameterDescription
Disable XML To JSON Auto ConvertWhen checked, XML responses are not automatically converted into JSON format.
Dry RunChecks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

Automation Library Example

Ec2 Delete Security Group with Aws and Send Results Via Email

Automation LibraryPreview this Automation on desktop