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?
Should have used --group-id
instead of --group-name
.
Most helpful comment
Should have used
--group-id
instead of--group-name
.