Necessary s3cmd S3 permissions for PUT/Sync

前端 未结 4 884
长发绾君心
长发绾君心 2021-02-04 05:17

In moving to AWS EC2, I want to restrict my instances\' user permissions for good reason. One thing the instances need to do is access files on S3 and write files there. However

4条回答
  •  梦谈多话
    2021-02-04 05:55

    bwight's answer is almost right (it probably used to be for older versions of s3cmd), but I need to add a s3:PutObjectAcl to get it to work:

    {
      "Version": "2012-10-17",
      "Statement": [
        {
          "Sid": "Stmt123456",
          "Effect": "Allow",
          "Action": [
            "s3:ListAllMyBuckets"
          ],
          "Resource": [
            "arn:aws:s3:::*"
          ]
        },
        {
          "Sid": "Stmt123457",
          "Effect": "Allow",
          "Action": [
            "s3:ListBucket",
            "s3:PutObject",
            "s3:PutObjectAcl"
          ],
          "Resource": [
            "arn:aws:s3:::bucketname",
            "arn:aws:s3:::bucketname/*"
          ]
        }
      ]
    }
    

提交回复
热议问题