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?

1 Answer
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
EXPERT
answered 3 months ago
  • Were you able to fix the bucket policy?

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions