I would like to use the ec2 driver to start instances in the amazon cloud if my local hardware has not enough resources anymore. Therefore I created a new VPC in the amazon cloud because I cannot use the default VPC due to an ip address conflict in my network. I had contact with the amazon support and I got the message that they can just create a new default vpn with a fixed ip range and that I have to create a new VPC if I want to use another ip range. And it is not possible to change the default value for a VPC. In other words: I cannot use the default VPC.
Therefore I have to use the (non-default) VPC. To do that I have to specify a subnet in my EC2 context. But if I specify the subnet, my instance creation process fails. I got the following error message:
The parameter groupName cannot be used with the parameter subnet.
Without the subnet parameter I can launch an instance (in the “wrong” default VPC).
I googled this error message and I found a lot of stuff related to that error message. Unfortunately the solution was always to use the securitygroup Id instead of the securitygroup name. But I cannot enter a securitygroup id, only the securitygroup name. The id is just not available.
Has anybody an idea how to solve such a problem? I mean how to launch an instance in a specific subnet?
I used the following EC2 options:
EC2=[ AMI="ami-1234XYZ", INSTANCETYPE="t2.micro", KEYPAIR="keypair", SECURITYGROUPS="sg-1234abcd", SUBNETID="subnet-12345678" ]
Thank you very much.