s3cmd put --verbose --config="/home/pi/.s3cfg" myfile s3://bucket/prefix/object
给我答案:
INFO: Compiling list of local files...
INFO: Running stat() and reading/calculating MD5 values on 1 files, this may take some time...
INFO: Summary: 1 local files to upload
INFO: Forwarding request to us-west-2
ERROR: S3 error: Access Denied
我无法弄清楚出了什么问题。这些是我的权限:
{
"Effect": "Allow",
"Action": [
"s3:PutObject",
"s3:PutObjectAcl",
"s3:PutObjectVersionAcl",
"s3:GetObject"
],
"Resource": [
"arn:aws:s3:::bucket/prefix/*"
]
},
答案 0 :(得分:0)
我遇到了同样的问题,显然需要将以下策略明确添加到IAM用户策略中。由于某些奇怪的原因,需要为小文件而不是大文件设置。
“S3:GetBucketLocation”