aws-cli icon indicating copy to clipboard operation
aws-cli copied to clipboard

The parameter groupName cannot be used with the parameter subnet

Open abarke opened this issue 5 years ago • 6 comments

Confirm by changing [ ] to [x] below to ensure that it's a bug:

Describe the bug Error when running a combination of commands.

SDK version number aws-cli/1.18.147 Python/2.7.18 Linux/4.14.193-149.317.amzn2.x86_64 botocore/1.18.6

Platform/OS/Hardware/Device EC2 t2.large Linux/4.14.193-149.317.amzn2.x86_64

To Reproduce (observed behavior)

Command:

aws ec2 --profile default run-instances --subnet-id subnet-11111111111111111 --image-id ami-1111111111111111 --instance-type m5.xlarge --key-name my-key --security-groups default --count 1

Output: An error occurred (InvalidParameterCombination) when calling the RunInstances operation: The parameter groupName cannot be used with the parameter subnet

Solution (use --security-group-ids):

aws ec2 --profile default run-instances --subnet-id subnet-11111111111111111 --image-id ami-1111111111111111 --instance-type m5.xlarge --key-name my-key --security-group-ids sg-1111111111111111 --count 1

Expected behavior There should not be an error

Logs/output Not putting debug info with security tokens in a public context.

Additional context

abarke avatar Oct 29 '20 15:10 abarke