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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠