【发布时间】:2022-09-30 19:27:32
【问题描述】:
我正在尝试使用 Cloudformation 部署 EC2 实例,但出现以下错误:
No default VPC for this user. GroupName is only supported for EC2-Classic and default VPC
尽管在安全组上明确设置了 vpc:
\"InstanceSecurityGroup\" : {
\"Type\" : \"AWS::EC2::SecurityGroup\",
\"Properties\" : {
\"GroupName\": \"SG-AD-TSDB\",
\"GroupDescription\" : \"Enable SSH access via port 22\",
\"VpcId\": \"vpc-<private>\",
\"SecurityGroupIngress\" : [ {
\"IpProtocol\" : \"tcp\",
\"FromPort\" : \"22\",
\"ToPort\" : \"22\",
\"CidrIp\" : { \"Ref\" : \"SSHLocation\"}
} ]
}
}
我不知道如何处理这个错误。
-
你能提供更多的模板吗?我不认为错误源于您发布的代码。它的来源必须在其他地方。
标签: amazon-web-services amazon-ec2 amazon-cloudformation