Beispiel #1
0
def fast_upload_s3_keys(s3conn, source, bucket_name, prefix, meta):
    cmd = "aws s3 cp --region us-east-1 {0} s3://{1}/{2}".format(source,
                                                                 bucket_name,
                                                                 prefix)
    # execute_wait(app, cmd, walltime, job_id)
    duration = command.execute_wait(None, cmd, None, None)
    return duration
Beispiel #2
0
def fast_download_s3_keys(creds, bucket_name, prefix, target):
    env_vars = "export AWS_ACCESS_KEY_ID={0};export AWS_SECRET_ACCESS_KEY={1};export AWS_SECURITY_TOKEN={2};export AWS_DEFAULT_REGION={3}".format(
        creds["AccessKeyId"], creds["SecretAccessKey"], creds["SessionToken"],
        "us-east-1")
    cmd = "{3};aws s3 cp --region us-east-1 s3://{1}/{2} {0} ".format(
        target, bucket_name, prefix, env_vars)
    duration = command.execute_wait(None, cmd, None, None)
    return duration
Beispiel #3
0
def fast_download_s3_keys(creds, bucket_name, prefix, target):
    env_vars = "export AWS_ACCESS_KEY_ID={0};export AWS_SECRET_ACCESS_KEY={1};export AWS_SECURITY_TOKEN={2};export AWS_DEFAULT_REGION={3}".format(creds["AccessKeyId"], creds["SecretAccessKey"], creds["SessionToken"], "us-east-1")
    cmd = "{3};aws s3 cp --region us-east-1 s3://{1}/{2} {0} ".format(target,
                                                                      bucket_name,
                                                                      prefix,
                                                                      env_vars)
    duration = command.execute_wait(None, cmd, None, None)
    return duration
Beispiel #4
0
def fast_upload_s3_keys(s3conn, source, bucket_name, prefix, meta):
    cmd = "aws s3 cp --region us-east-1 {0} s3://{1}/{2}".format(
        source, bucket_name, prefix)
    # execute_wait(app, cmd, walltime, job_id)
    duration = command.execute_wait(None, cmd, None, None)
    return duration