错误上传小文件使用s3cmd到S3? [英] Error uploading small files to s3 using s3cmd?

查看:430
本文介绍了错误上传小文件使用s3cmd到S3?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个不寻常的错误:我的文件似乎太小,被上传到S3

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.

幻数似乎是15MB,在该点s3cmd开始做多部分上传。

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

推荐答案

我正在运行到同样的问题,显然下面的政策需要显式地添加到IAM用户策略。对于一些奇怪的原因,这就需要对小文件,但没有大的文件进行设置。

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"

哇,这只是把3小时我的生活弄清楚。

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

这篇关于错误上传小文件使用s3cmd到S3?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆