<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _upload_file_aws_cli(local_fname, bucket, keyname, config=None, mditems=None):
 """Streaming upload via the standard AWS command line interface. """

    s3_fname = "s3://%s/%s" % (bucket, keyname)
    args = ["--sse", "--expected-size", str(os.path.getsize(local_fname))]
    if config:
        if config.get("region"):
            args += ["--region", config.get("region")]
        if config.get("reduced_redundancy"):
            args += ["--storage-class", "REDUCED_REDUNDANCY"]
    cmd = [os.path.join(os.path.dirname(sys.executable), "aws"), "s3", "cp"] + args + \
          [local_fname, s3_fname]
    do.run(cmd, "Upload to s3: %s %s" % (bucket, keyname))