S3_access_error

0

Hi there, I have a s3 bucket where I had access to objects, I changed the s3 bucket policy, after which I have no access to any objects.

My Bucket policy looks like: { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::592@@#@$433:root" }, "Action": "s3:", "Resource": [ "arn:aws:s3:::itse%$#%$ey", "arn:aws:s3:::itse%$#%ney/" ] } ] }

error looks like that: This XML file does not appear to have any style information associated with it. The document tree is shown below. <Error> <Code>AccessDenied</Code> <Message>Access Denied</Message> <RequestId>VZPV5P5M21TS0WNM</RequestId> <HostId>DmfNux+XSy9Gz2gHVXTNFVwWxPf6EucNWWbHThaZXRdw8HYFVQQOshuxp6KB8eJP8Y46/PQO8L8=</HostId> </Error>

I have administrator access and what could be the reason?

Toko
已提問 4 個月前檢視次數 138 次
1 個回答
2

Though, I'm not sure, what is your exact use case for setting up this bucket policy but here is the correct format of same:

      { 
        "Version": "2012-10-17", 
        "Statement": [ 
          { "Effect": "Allow", 
          "Principal": { 
            "AWS": [
              "arn:aws:iam::592@@#@$433:root" 
            ]},
          "Action": "s3:*", 
          "Resource": [ 
            "arn:aws:s3:::itse%$#%$ey",
            "arn:aws:s3:::itse%$#%ney/*"
            ] 
          } 
        ] 
      }

"*" was missing in your policy for Action and Resource.

For more details, please refer AWS Documentation Bucket policy examples.

Comment here if you have additional questions, happy to help.

profile pictureAWS
專家
已回答 4 個月前
  • Were you able to fix the bucket policy?

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南