9
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

s3 syncに必要なアクセス権限

Last updated at Posted at 2017-03-30

経緯

ポリシー内で指定できるアクセス権限周りは下記があり、syncに必要な権限は何か確認した。

  • オブジェクトオペレーションに対するアクセス権限
  • バケットオペレーションに関連するアクセス権限
  • バケットサブリソースオペレーションに関連するアクセス権限

結論

コンソールベースのアクセス権限が不要な場合(arnは適宜変更)

  policy = <<EOF
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Action": [
        "s3:ListBucket",
        "s3:GetObject",
        "s3:PutObject"
      ],
      "Effect": "Allow",
      "Resource": "arn:aws:s3:::*"
    }
  ]
}
EOF
}

コンソールベースのアクセス権限が必要な場合(arnは適宜変更)

  policy = <<EOF
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Action": 
        "s3:ListAllMyBuckets",
        "s3:GetBucketLocation",
        "s3:ListBucket",
        "s3:GetObject",
        "s3:PutObject"
      ],
      "Effect": "Allow",
      "Resource": "arn:aws:s3:::*"
    }
  ]
}
EOF
}
9
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?