【发布时间】:2019-09-01 03:42:28
【问题描述】:
我的代码正在运行。我面临的唯一问题是我无法在 S3 存储桶中指定要放置文件的文件夹。这就是我所拥有的:
with open("/hadoop/prodtest/tips/ut/s3/test_audit_log.txt", "rb") as f:
s3.upload_fileobj(f, "us-east-1-tip-s3-stage", "BlueConnect/test_audit_log.txt")
【问题讨论】:
-
将
BlueConnect/更改为您想要的任何文件夹。 -
BlueConnect 是文件夹名称,我要在其中上传文件
-
那么到底是什么不工作?你收到错误消息还是什么?
标签: python-2.7 amazon-web-services amazon-s3 boto3