An error occurred (InvalidParameterCombination) when calling the RunInstances operation: The parameter groupName cannot be...
-
Full Error Message:
An error occurred (InvalidParameterCombination) when calling the RunInstances operation: The parameter groupName cannot be used with the parameter subnetaws ec2 run-instances --image-id ami-xxxxxx --count 3 --instance-type t2.micro --key-name "trainer" --security-groups "trainer" --subnet-id subnet-034c92sa3292bb35de --user-data file://cloud-config.yml An error occurred (InvalidParameterCombination) when calling the RunInstances operation: The parameter groupName cannot be used with the parameter subnet
The bit of the solution is in highlighted part of the error message:
An error occurred (InvalidParameterCombination) when calling the RunInstances operation: The parameter groupName cannot be used with the parameter subnet
The groupName in the message although it does not make it completely obvious is the "security group name", If you change this for security group id instead it will work fine.
i.e.
This (works):
--security-group-ids "sg-097323xx664ef3c98"
instead of:
--security-groups "trainer"In a subnet & security group combination that is how it works.
© Lightnetics 2024