You don't have permissions to edit bucket policy

1

I've created a bucket yet somehow I don't have permission to edit its bucket policy. When I try to save this policy in the AWS console...

{
"Version":"2012-10-17",
"Statement":[
{
"Sid":"PublicRead",
"Effect":"Allow",
"Principal": "",
"Action":["s3:GetObject","s3:GetObjectVersion"],
"Resource":["arn:aws:s3:::snaptut/
"]
}
]
}

I get this message:

You don't have permissions to edit bucket policy
After you or your AWS administrator have updated your permissions to allow the s3:PutBucketPolicy action, choose Save changes. Learn more about Identity and access management in Amazon S3.

As far as I know I am the AWS administrator. (There's nobody else on this account anyway!) So how do I give myself s3:PutBucketPolicy? ...I'm new to AWS, but these permissions are a nightmare.

kohlab
asked 3 years ago5010 views
2 Answers
1

Thanks for your reply. I worked through that page as best I could and had no luck. But I did find a workaround for now.

THE PAGE

I have only one user set up in IAM, and their permissions from the group they're in are AmazonS3FullAccess. I sign in as root user, which is how I created the bucket. I find it confusing that this identity is not listed in IAM, but I assume the root has all permissions as well.

THE WORKAROUND

After doing some googling, I found that if I make the bucket open to the public then I can save the bucket policy and then make the bucket private again. This seems very strange, but it allowed me to save a bucket policy. (The policy isn't doing what I want but that's a separate issue and thread in this forum.)

kohlab
answered 3 years ago
0

Hi there,

I definitely understand the frustration you're experiencing with that error message.

Please give these troubleshooting steps: https://aws.amazon.com/premiumsupport/knowledge-center/s3-access-denied-bucket-policy/ a go to see if they help to mitigate the issue.

Any changes?

  • ZackAWS
AWS
EXPERT
answered 3 years ago

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