AWS Fundamentals Logo
AWS Fundamentals
AWS::EC2::SecurityGroupIngress

EC2 SecurityGroupIngress

Resource Type definition for AWS::EC2::SecurityGroupIngress

Properties

12 configurable properties. 1 required. Click a row to see details.

Filter:
PropertyTypeFlags
IpProtocol
string
RequiredCreate-only
CidrIp
string
Create-only
CidrIpv6
string
Create-only
Description
string
FromPort
integer
Create-only
GroupId
string
Create-only
GroupName
string
Create-only
SourcePrefixListId
string
Create-only
SourceSecurityGroupId
string
Create-only
SourceSecurityGroupName
string
Create-only
SourceSecurityGroupOwnerId
string
Create-only
ToPort
integer
Create-only

Return Values

Values returned after the resource is created. Access these with Fn::GetAtt.

AttributeTypeDescription
IdstringThe Security Group Rule Id

Sample CloudFormation Template

A minimal template with required properties and common optional ones.

template.yaml
AWSTemplateFormatVersion: "2010-09-09"
Description: Sample template for AWS::EC2::SecurityGroupIngress

Resources:
  MyResource:
    Type: AWS::EC2::SecurityGroupIngress
    Properties:
      IpProtocol: "value"
      Description: !Ref "AWS::StackName"

Required IAM Permissions

Permissions CloudFormation needs in your IAM role to manage this resource.

create

ec2:DescribeSecurityGroupRulesec2:AuthorizeSecurityGroupIngress

update

ec2:UpdateSecurityGroupRuleDescriptionsIngress

delete

ec2:DescribeSecurityGroupRulesec2:RevokeSecurityGroupIngress

read

ec2:DescribeSecurityGroupsec2:DescribeSecurityGroupRules

list

ec2:DescribeSecurityGroupRules

Get the EC2 Cheat Sheet

Everything you need to know about EC2 on one page. HD quality, print-friendly.

Download Free Infographic

Quick Facts

ServiceEC2
Properties13
Required1
TaggingNot supported
Primary IDId

Supported Operations

CreateUpdateDeleteReadList

Immutable After Creation

These properties cannot be changed after the resource is created. Updating them triggers a replacement.

GroupNameIpProtocolSourceSecurityGroupIdSourcePrefixListIdToPortCidrIpSourceSecurityGroupNameSourceSecurityGroupOwnerIdFromPortGroupIdCidrIpv6

External Links