Aws-cli: aws ec2 authorize-security-group-ingress only works for default VPC?

Created on 9 Mar 2015  路  1Comment  路  Source: aws/aws-cli

I can't seem to run aws ec2 authorize-security-group-ingress on a VPC that is not the default VPC:

aws ec2 authorize-security-group-ingress --group-name sg-3acb815f --protocol tcp --port 80 --cidr 0.0.0.0 --profile foo --region us-west-2                     

A client error (InvalidGroup.NotFound) occurred when calling the AuthorizeSecurityGroupIngress operation: The security group 'sg-3acb815f' does not exist in default VPC 'vpc-a9f252cc'

And --vpc-id is an invalid option for this subcommand. Am I doing something wrong?

Most helpful comment

Should have used --group-id instead of --group-name.

>All comments

Should have used --group-id instead of --group-name.

Was this page helpful?
0 / 5 - 0 ratings