Create security group at CLI, getting InvalidVpcID.NotFound The vpc ID does not exist

Viewed 3426

Trying to issue:

$ aws ec2 create-security-group --group-name Grp1 --description Grp1 --vpc-id vpc-0e6f748e8c01534bc

But I get

An error occurred (InvalidVpcID.NotFound) when calling the CreateSecurityGroup operation:  
The vpc ID 'vpc-0e6f748e8c01534bc' does not exist

That vpc does exists, but it isn't being recognized.
It is in a different region.
I can't specify region in the command.
How do I get around that?

enter image description here

1 Answers

When you do some command on the aws cli, you can submit the region option as follows.

aws cli <some code> --region <region>

The cli options are listed in the aws documentation.

Related