aws-cli
aws-cli copied to clipboard
The parameter groupName cannot be used with the parameter subnet
Confirm by changing [ ] to [x] below to ensure that it's a bug:
- [x ] I've gone though the User Guide and the API reference
- [x ] I've searched for previous similar issues and didn't find any solution
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