类似于此问题: How do I add a cloudformation security group ingress rule that refers to another security group?
是否可以引用另一个AWS账户中的安全组?
理想情况下,我想采用这样的字符串输入参数: {account-id} / {security-group-id}
这行不通,但是不确定为什么不行。
"SecurityGroupEgress": [
{
"Description": "test referencing cross account sg",
"DestinationSecurityGroupId": "1234455677/sg-124455",
"IpProtocol": "icmp",
"FromPort": "-1",
"ToPort": "-1"
}
],
然后在“模板入口/出口”规则中引用它。