> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blinkops.com/llms.txt
> Use this file to discover all available pages before exploring further.

# EC2 Create Security Group

Creates a security group.

A security group acts as a virtual firewall for your instance to control inbound and outbound traffic. For more information, see [Amazon EC2 security groups](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html) in the *Amazon Elastic Compute Cloud User Guide* and [Security groups for your VPC](https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html) in the *Amazon Virtual Private Cloud User Guide*.

When you create a security group, you specify a friendly name of your choice. You can have a security group for use in EC2-Classic with the same name as a security group for use in a VPC. However, you can't have two security groups for use in EC2-Classic with the same name or two security groups for use in a VPC with the same name.

You have a default security group for use in EC2-Classic and a default security group for use in your VPC. If you don't specify a security group when you launch an instance, the instance is launched into the appropriate default security group. A default security group includes a default rule that grants instances unrestricted network access to each other.

You can add or remove rules from your security groups using AuthorizeSecurityGroupIngress, AuthorizeSecurityGroupEgress, RevokeSecurityGroupIngress, and RevokeSecurityGroupEgress.

For more information about VPC security group limits, see [Amazon VPC Limits](https://docs.aws.amazon.com/vpc/latest/userguide/amazon-vpc-limits.html).

<Note>
  External Documentation

  To learn more, visit the [AWS documentation](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateSecurityGroup.html).
</Note>

## Basic Parameters

<div className="integrations-table">
  | Parameter     | Description                                                                                                                                                                                                                                                                 |
  | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | AWS Region(s) | Enter the desired AWS Region(s).<br /><br />To execute the action in multiple regions, provide a comma-separated list.<br />For example: `us-east-1,eu-west-2`.<br /><br />If you wish to run the action in all available regions, use the asterisk symbol (`*`) instead.   |
  | Description   | A description for the security group. This is informational only.<br /><br />Constraints: Up to 255 characters in length<br /><br />Constraints for EC2-Classic: ASCII characters<br /><br />Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and .\_-:/()#,@\[]+=&;{}!\$\*. |
  | Group Name    | The name of the security group.<br /><br />Constraints: Up to 255 characters in length. Cannot start with `sg-`.<br /><br />Constraints for EC2-Classic: ASCII characters<br /><br />Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and .\_-:/()#,@\[]+=&;{}!\$\*.         |
  | VPC ID        | \[EC2-VPC] The ID of the VPC. Required for EC2-VPC.                                                                                                                                                                                                                         |
</div>

## Advanced Parameters

<div className="integrations-table">
  | Parameter                        | Description                                                                                                                                                                                                                                                    |
  | -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | Disable XML To JSON Auto Convert | When checked, XML responses are not automatically converted into JSON format.                                                                                                                                                                                  |
  | Dry Run                          | Checks 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`. |
  | Tag Specifications               | The tags to assign to the security group.                                                                                                                                                                                                                      |
</div>

## Example Output

```json theme={"dark"}
{
	"GroupId": "sg-903004f8"
}
```

## Workflow Library Example

[Ec2 Create Security Group with Aws and Send Results Via Email](https://library.blinkops.com/workflows/ec2-create-security-group-with-aws-and-send-results-via-email)

<div className="iframe-wrapper">
  <div className="iframe-media">
    <img src="https://mintcdn.com/blinkops-2/ojHYuDeYX5FWuN8a/img/Icons/play-box.svg?fit=max&auto=format&n=ojHYuDeYX5FWuN8a&q=85&s=b8af968e71438a9499c3223c9bd29fb2" alt="Workflow Library" width="16" height="16" data-path="img/Icons/play-box.svg" />

    Preview this Workflow on desktop
  </div>

  <iframe className="iframe" src="https://library.blinkops.com/workflows/ec2-create-security-group-with-aws-and-send-results-via-email/canvas" />
</div>
