gpt4 book ai didi

json - AWS CloudFormation 网络接口(interface)错误

转载 作者:行者123 更新时间:2023-12-03 07:31:50 24 4
gpt4 key购买 nike

每当启动堆栈时,我都会收到此错误

(Network interfaces and an instance-level security groups may not be specified on the same request (Service: AmazonEC2; Status Code: 400; Error Code: InvalidParameterCombination; Request ID:....))

Aws 控制台 中的状态为:ROLLBACK_COMPLETE

如何解决这个错误?

EC2Instance:
Type: 'AWS::EC2::Instance'
Properties:
SecurityGroups:
- !Ref SecurityGroup
KeyName : !Ref EC2Key
AvailabilityZone: us-east-2a
ImageId: ami-01410f0e8f8b1acca
InstanceType: t2.micro
NetworkInterfaces:
- DeviceIndex: '0'
SubnetId: !Ref PublicSubnet

最佳答案

您想要指定网络接口(interface)有什么具体原因吗?

如果您需要完成的只是将实例部署到特定子网中,只需删除 NetworkInterfaces 部分并为实例本身指定子网即可。

EC2Instance:
Type: 'AWS::EC2::Instance'
Properties:
SecurityGroups:
- !Ref SecurityGroup
KeyName : !Ref EC2Key
AvailabilityZone: us-east-2a
ImageId: ami-01410f0e8f8b1acca
InstanceType: t2.micro
SubnetId: !Ref PublicSubnet

关于json - AWS CloudFormation 网络接口(interface)错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59950969/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com