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
已提问 3 年前4876 查看次数
2 回答
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
已回答 3 年前
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
专家
已回答 3 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则