mitchellh/vagrant-aws — pull request #270 by rosco5 (2014-07-23 19:23:44+00:00)
Title: Improve documentation for aws.security_groups in a VPC

The documentation here is correct:
http://docs.aws.amazon.com/cli/latest/reference/ec2/run-instances.html

If you specify aws.subnet_id and specify a list of security group names names for aws.security_groups, then you will get the following error message:

==> default: Launching an instance with the following settings...
==> default: -- Security Groups: ["A","B"]
...
==> default: -- Assigning a public IP address in a VPC: false
There was an error talking to AWS. The error message is shown
below:

InvalidParameterCombination => The parameter groupName cannot be used with the parameter subnet

If you specify aws.subnet_id and specify a list of security group IDs names for aws.security_groups, then this plugin works:

==> default: Launching an instance with the following settings...
==> default: -- Security Groups: ["sg-1234","sg-4567"]
...
==> default: -- Assigning a public IP address in a VPC: false
==> default: Waiting for instance to become "ready"...
==> default: Waiting for SSH to become available...
==> default: Machine is booted and ready for use!

See people talking about this here:
http://stackoverflow.com/questions/22365470/launching-instance-vpc-security-groups-may-not-be-used-for-a-non-vpc-launch