def connect_ec2_endpoint(url, aws_access_key_id=None,
                         aws_secret_access_key=None,
                         **kwargs):
    from boto.ec2.regioninfo import RegionInfo

    purl = urlparse(url)
    kwargs['port'] = purl.port
    kwargs['host'] = purl.hostname
    kwargs['path'] = purl.path
    if not 'is_secure' in kwargs:
        kwargs['is_secure'] = (purl.scheme == "https")

    kwargs['region'] = RegionInfo(name=purl.hostname,
                                  endpoint=purl.hostname)
    kwargs['aws_access_key_id'] = aws_access_key_id
    kwargs['aws_secret_access_key'] = aws_secret_access_key

    return(connect_ec2(**kwargs))
Connect to an EC2 Api endpoint.  Additional arguments are passed
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/boto-2.38.0/boto/__init__.py/connect_ec2_endpoint