0
s3cmd put --verbose --config="/home/pi/.s3cfg" myfile s3://bucket/prefix/object

Gives me the answer:

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

I can't figure out what's wrong. These are my permissions:

{
        "Effect": "Allow",
        "Action": [
            "s3:PutObject",
            "s3:PutObjectAcl",
            "s3:PutObjectVersionAcl",
            "s3:GetObject"
        ],
        "Resource": [
            "arn:aws:s3:::bucket/prefix/*"
        ]
    },
Paolo
  • 2,161
  • 5
  • 25
  • 32

1 Answers1

0

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"

Error uploading small files to s3 using s3cmd?

Yawar
  • 1,016
  • 1
  • 12
  • 14