    # File lib/fog/aws/requests/compute/run_instances.rb, line 124
            def run_instances(image_id, min_count, max_count, options = {})
              response = Excon::Response.new
              response.status = 200

              group_set = [ (options['SecurityGroup'] || 'default') ].flatten
              instances_set = []
              reservation_id = Fog::AWS::Mock.reservation_id

              if options['KeyName'] && describe_key_pairs('key-name' => options['KeyName']).body['keySet'].empty?
                raise Fog::Compute::AWS::NotFound.new("The key pair '#{options['KeyName']}' does not exist")
              end

              min_count.times do |i|
                instance_id = Fog::AWS::Mock.instance_id
                instance = {
                  'amiLaunchIndex'      => i,
                  'blockDeviceMapping'  => [],
                  'clientToken'         => options['clientToken'],
                  'dnsName'             => nil,
                  'imageId'             => image_id,
                  'instanceId'          => instance_id,
                  'instanceState'       => { 'code' => 0, 'name' => 'pending' },
                  'instanceType'        => options['InstanceType'] || 'm1.small',
                  'kernelId'            => options['KernelId'] || Fog::AWS::Mock.kernel_id,
                  'keyName'             => options['KeyName'],
                  'launchTime'          => Time.now,
                  'monitoring'          => { 'state' => options['Monitoring.Enabled'] || false },
                  'placement'           => { 'availabilityZone' => options['Placement.AvailabilityZone'] || Fog::AWS::Mock.availability_zone(@region), 'groupName' => nil, 'tenancy' => 'default' },
                  'privateDnsName'      => nil,
                  'productCodes'        => [],
                  'reason'              => nil,
                  'rootDeviceType'      => 'instance-store'
                }
                instances_set << instance
                self.data[:instances][instance_id] = instance.merge({
                  'architecture'        => 'i386',
                  'groupSet'            => group_set,
                  'ownerId'             => self.data[:owner_id],
                  'privateIpAddress'    => nil,
                  'reservationId'       => reservation_id,
                  'stateReason'         => {}
                })
              end
              response.body = {
                'groupSet'      => group_set,
                'instancesSet'  => instances_set,
                'ownerId'       => self.data[:owner_id],
                'requestId'     => Fog::AWS::Mock.request_id,
                'reservationId' => reservation_id
              }
              response
            end