Error uploading small files to s3 using s3cmd?

爷,独闯天下 提交于 2019-12-20 04:50:55

问题


I am having an unusual error: my files appear to be too small to be uploaded to s3!

I have a small log file which is not uploading:

s3cmd put log.txt s3://MY-BUCKET/MY-SUB-BUCKET/
ERROR: S3 error: Access Denied

But when I do this:

yes | head -n 10000000 >> log.txt
s3cmd put log.txt s3://MY-BUCKET/MY-SUB-BUCKET/
# this works for some reason.

The magic number appears to be 15MB, the point at which s3cmd starts doing multipart uploads.


回答1:


I was running into this same issue and apparently the following policy needs to be explicitly added to the IAM users policy. For some odd reason this needs to be set for small files but not large files.

"s3:GetBucketLocation"

Wow, that just took 3 hours of my life to figure out.



来源:https://stackoverflow.com/questions/31254640/error-uploading-small-files-to-s3-using-s3cmd

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!