Aws-cli: RDS --vpc-security-group-ids does not support multiple groups

Created on 2 Jan 2014  ·  3Comments  ·  Source: aws/aws-cli

I used to use this command with the old RDS tools:

rds-modify-db-instance myinstance --region=us-west-1 --vpc-security-group-ids sg-one, sg-two

When trying to apply the same command using "aws rds" it fails:

aws rds modify-db-instance --db-instance-identifier myinstance --vpc-security-group-ids sg-one, sg-two

with the following :

A client error (InvalidParameterValue) occurred when calling the ModifyDBInstance operation: Invalid security group , groupId= sg-one, sg-two,, groupName=.

running the command with a single group works fine:

 aws rds modify-db-instance --db-instance-identifier myinstance --vpc-security-group-ids sg-one  

Most helpful comment

Worked for me as well. Thanks! The AWS docs here: http://docs.aws.amazon.com/AmazonRDS/latest/CommandLineReference/CLIReference-cmd-CreateDBInstance.html
are incorrect with this example:
--vpc-security-group-ids sg-e763f78e, sg-e0690405

This should be space-separated, not comma-separated.

All 3 comments

You should be able to supply multiple security group names as space-separated values for the --vpc-security-group-ids option, as in:

aws rds modify-db-instance --vpc-security-group-ids sg-one sg-two --db-instance-identifier <...>

that worked!
updating to the latest aws version also shows this in the help section, which i missed.
thanks!

Worked for me as well. Thanks! The AWS docs here: http://docs.aws.amazon.com/AmazonRDS/latest/CommandLineReference/CLIReference-cmd-CreateDBInstance.html
are incorrect with this example:
--vpc-security-group-ids sg-e763f78e, sg-e0690405

This should be space-separated, not comma-separated.

Was this page helpful?
0 / 5 - 0 ratings