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
gefragt vor 3 Jahren4883 Aufrufe
2 Antworten
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
beantwortet vor 3 Jahren
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
EXPERTE
beantwortet vor 3 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen