Print this pageEmail this pageGo to the ForumsView the PDFShare this page on TwitterShare this page on FacebookBookmark this page on DeliciousSubmit this page to RedditSubmit this page to Digg

CreateSecurityGroup

Description

Creates a new security group. Group names must be unique per account.

Every instance is launched in a security group. If no security group is specified during launch, the instances are launched in the default security group. Instances within the same security group have unrestricted network access to each other. Instances will reject network access attempts from other instances in a different security group. As the owner of instances you can grant or revoke specific permissions using the AuthorizeSecurityGroupIngress and RevokeSecurityGroupIngress operations.

For more information about security groups, go to Security Groups in the Amazon Elastic Compute Cloud User Guide.

Request Parameters

NameDescriptionRequired

GroupName

Name of the security group.

Type: String

Default: None

Constraints: Accepts alphanumeric characters, spaces, dashes, and underscores.

Yes

GroupDescription

Description of the group. This is informational only.

Type: String

Default: None

Constraints: Accepts alphanumeric characters, spaces, dashes, and underscores.

Yes

Response Elements

The elements in the following table come wrapped in a CreateSecurityGroupResponse structure.

NameDescription

requestId

The ID of the request.

Type: xsd:string

return

Returns true if the request succeeds. Otherwise, returns an error.

Type: xsd:boolean

Examples

Example Request

This example creates the websrv security group.

https://ec2.amazonaws.com/?Action=CreateSecurityGroup
&GroupName=websrv
&GroupDescription="Web Servers"
&AuthParams

Example Response

<CreateSecurityGroupResponse xmlns="http://ec2.amazonaws.com/doc/2010-08-31/">
   <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId>
   <return>true</return>
</CreateSecurityGroupResponse>