1

I'm trying to just launch webservers into my webservers security group, but I get this:

$ aws ec2 run-instances --image-id ami-someami --count 2 --instance-type m3.medium --key-name some_key --security-groups Webservers

A client error (InvalidParameterCombination) occurred when calling the RunInstances operation: VPC security groups may not be used for a non-VPC launch

What gives? I just want to launch boxes into my default VPC. I don't want to specify a subnet, but even if I do, I can no longer specify my security group. I'm new to EC2, and would rather not worry about doing non-default things with my VPC until I have to.

4

2 に答える 2

0

エラー:

VPC セキュリティ グループは、VPC 以外の起動には使用できない場合があります

は、 VPCの外でインスタンスを起動しようとしていることを意味します。セキュリティ グループはインスタンスに関連付けられていることに注意してください。つまり、VPC にリンクされている Security Group と Subnets の間には関係があります。

vpc_icこれは、別のインスタンス (t2.micro など) に切り替えて、およびを指定しない場合の最も一般的な問題ですsubnet_id。たとえば、packer の場合:

"vpc_id": "vpc-62086907",
"subnet_id": "subnet-01451564",

次のようなインスタンスの設定を確認する必要があります。

  • インスタンス作成プロセスのパラメータ
  • VPC のインスタンスを起動するサブネット ID ( subnet_idPacker/Vagrant の場合、または Ansible の vpc_subnet_id) を指定する必要があります。
  • AWS VPC を設定するときは、サブネット ID とグループ ID のみを使用してください。
  • また、古いバージョンの AWS を使用しているかどうかを再確認してください。テンプレートを更新して VPC も構築してください。

関連している:

于 2016-06-11T21:19:53.860 に答える