From 686fba0637541cc913185bc7dec176565393a719 Mon Sep 17 00:00:00 2001 From: Katsuhisa Kitano <91katsuhisa@gmail.com> Date: Fri, 13 Sep 2024 00:19:22 +0900 Subject: [PATCH] Fix: Replace SecurityGroups with SecurityGroupIds in EC2 resource - Updated the EC2 instance template to reference security groups by ID instead of name. - Resolved conflict between subnet and groupName parameters, preventing errors during stack creation. --- EC2/EC2InstanceWithSecurityGroupSample.json | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/EC2/EC2InstanceWithSecurityGroupSample.json b/EC2/EC2InstanceWithSecurityGroupSample.json index 1c8cf8ab..33c07727 100644 --- a/EC2/EC2InstanceWithSecurityGroupSample.json +++ b/EC2/EC2InstanceWithSecurityGroupSample.json @@ -91,9 +91,12 @@ } ] }, - "SecurityGroups": [ + "SecurityGroupIds": [ { - "Ref": "InstanceSecurityGroup" + "Fn::GetAtt": [ + "InstanceSecurityGroup", + "GroupId" + ] } ], "KeyName": {