0

I am trying to create an AWS instance using rubygem fog. For some reason the bootstrap method just takes too long (more than 10 minutes) and my script times out. Here is what I am using

server = @compute.servers.bootstrap(:key_name => 'mykey',
                                    :username => 'foo',
                                    :flavor_id => flavor_id,
                                    :image_id => image_id,
                                    :subnet_id => "my_subnet_id",
                                    :groups => ["my_security_group"])
server.wait_for { ready? }

When I tried to create the instance from AWS CLI and aws-ruby-sdk I was able to do that successfully with ease. Just the difference was instead of security group name I had to use security group id. The fog gem cries if I dont specify :groups list and assigns default security group. I am trying to create my instance in a VPC. (FYI)

ankitrokdeonsns
  • 638
  • 4
  • 18

1 Answers1

-1

When creating an instance inside a vpc you need to specify the :security_group_ids option (with an array of group ids rather than names) instead of the :groups option.

Frederick Cheung
  • 83,189
  • 8
  • 152
  • 174