'create connection to api server'

def connect(self, region):

    if self.eucalyptus:
        conn = boto.connect_euca(host=self.eucalyptus_host, **self.credentials)
        conn.APIVersion = '2010-08-31'
    else:
        conn = self.connect_to_aws(ec2, region)
    return conn
