Is there an S3 policy for limiting access to only see/access one bucket?

前端 未结 23 748
孤城傲影
孤城傲影 2020-11-29 15:08

I have a simple bucket that looks like images.mysite.com on my S3 and other buckets containing backups, etc.

I want to allow a specific user to be able

23条回答
  •  自闭症患者
    2020-11-29 15:58

    Try this policy. User cannot list any bucket, they have to use direct link to allowed bucket.

    For example: s3.console.aws.amazon.com/s3/buckets/bucketname/?region=us-east-1&tab=overview

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

提交回复
热议问题