def parseS3Dataset(s3InterfaceFactory, s3Dataset):
    if s3Dataset.isInternal():
        #use the internal login. This should have access only to our one internal bucket
        return (
            s3InterfaceFactory(),
            Setup.config().userDataS3Bucket,
            s3Dataset.asInternal.keyname
            )

    elif s3Dataset.isExternal():
        asE = s3Dataset.asExternal
        interface = s3InterfaceFactory()

        return (interface, asE.bucket, asE.key)
    else:
        raise DatasetLoadException("Unknown dataset type")
Log in to amazon S3 and return an appropriate s3Interface and a bucket/keypair
dataset/ETHPy150Open ufora/ufora/ufora/FORA/python/PythonIoTasks.py/parseS3Dataset