Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

An error occurred (InvalidParameterValue) when calling the RunInstances operation: Value () for parameter groupId is invalid. The value cannot be empt

Tags:

amazon-ec2

I'm getting error when creating ec2 instance from my ami:

aws ec2 run-instances --image-id ami-3e21ed44   --count 1  --instance-type t2.medium --key-name sssoft --security-groups   launch-wizard-4

Isn't this example same as in here?

It is giving this error:

An error occurred (InvalidParameterValue) when calling the RunInstances operation: Value () for parameter groupId is invalid. The value cannot be empty

What is wrong?

like image 502
user5858 Avatar asked Oct 06 '17 11:10

user5858


2 Answers

The error means the security group launch-wizard-4 does not exist in your account.

If that security group does exist in your account, check the AWS CLI profile you're using. It uses default by default. But if you need to use a different profile, just add --profile my-profile-name to the command.

For more information on profiles: AWS CLI Named Profiles

like image 127
John Veldboom Avatar answered Oct 06 '22 00:10

John Veldboom


Silly mistake. In the command line the default zone was different from that of the AMI

like image 31
user5858 Avatar answered Oct 06 '22 01:10

user5858