AWS::EC2::SecurityGroupResource Type definition for AWS::EC2::SecurityGroup
6 configurable properties. 1 required. Click a row to see details.
| Property | Type | Flags |
|---|---|---|
GroupDescription | string | RequiredCreate-only |
GroupName | string | Create-only |
SecurityGroupEgress | Array<Egress> | |
SecurityGroupIngress | Array<Ingress> | |
Tags | Array<Tag> | |
VpcId | string | Create-only |
Values returned after the resource is created. Access these with Fn::GetAtt.
| Attribute | Type | Description |
|---|---|---|
GroupId | string | The group ID of the specified security group. |
Id | string | The group name or group ID depending on whether the SG is created in default or specific VPC |
A minimal template with required properties and common optional ones.
AWSTemplateFormatVersion: "2010-09-09"
Description: Sample template for AWS::EC2::SecurityGroup
Resources:
MyResource:
Type: AWS::EC2::SecurityGroup
Properties:
GroupDescription: "value"
Tags:
- Key: Environment
Value: ProductionPermissions CloudFormation needs in your IAM role to manage this resource.
ec2:DescribeSecurityGroupsec2:CreateSecurityGroupec2:DescribeSecurityGroupsec2:RevokeSecurityGroupEgressec2:AuthorizeSecurityGroupEgressec2:AuthorizeSecurityGroupIngressec2:CreateTagsec2:RevokeSecurityGroupEgressec2:RevokeSecurityGroupIngressec2:DescribeSecurityGroupsec2:AuthorizeSecurityGroupEgressec2:AuthorizeSecurityGroupIngressec2:UpdateSecurityGroupRuleDescriptionsIngressec2:UpdateSecurityGroupRuleDescriptionsEgressec2:CreateTagsec2:DescribeSecurityGroupsec2:DescribeSecurityGroupsec2:DeleteSecurityGroupec2:DescribeInstancesEverything you need to know about EC2 on one page. HD quality, print-friendly.
Download Free InfographicIdThese properties cannot be changed after the resource is created. Updating them triggers a replacement.
GroupDescriptionGroupNameVpcId