2 Answers
- Newest
- Most votes
- Most comments
1
Hi,
To refer to existing Security Groups, you can add them straight into your EC2 Resource Properties, under SecurityGroupIds.
Resources:
EC2Instance:
Type: AWS::EC2::Instance
Properties:
InstanceType:
Ref: InstanceType
SecurityGroupIds:
- sg-12345
- sg-12312
KeyName:
Ref: KeyName
ImageId:
Fn::FindInMap:
- AWSRegionArch2AMI
- Ref: AWS::Region
- Fn::FindInMap:
- AWSInstanceType2Arch
- Ref: InstanceType
- Arch
Hope this helps!
-randy
answered 5 years ago
Relevant content
- asked 7 months ago
- Accepted Answerasked a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago