Reputation: 1426
First, I have full access to all my s3 buckets (I've administrator permission).
after paying with my s3 bucket policy I'm getting a problem that I cannot view or edit anything in my bucket, and getting the "Access Denied" error message.
Upvotes: 2
Views: 16646
Reputation: 1
Try with endpoint url (http/https) using aws-cli
:
aws --endpoint-url http://s3.eu-west-1.amazonaws.com s3api put-bucket-policy --bucket <<bucketname>> --policy file://mypolicy.json
Ensure to update with correct policies in mypolicy.json
.
Upvotes: 0
Reputation: 270089
It sounds like you have added a Deny
rule on a Bucket Policy, which is overriding your Admin permissions. (Yes, it is possible to block access even for Administrators!)
In such a situation:
Fortunately, the account's "root" user always has full permissions. This is also why it should be used infrequently and access should be well-protected (eg using Multi-Factor Authentication).
Upvotes: 4
Reputation: 1135
You can try with
aws s3api delete-bucket-policy --bucket s3-bucket-name
Or otherwise, enter with root access and modify the policy
Upvotes: 3
Reputation: 143
I hope you have s3-bucket-Full-access in IAM role policies along with you need to setup
1.set Access-Control-list and Bucket Policies has to be public.
Bucket policies like below
{
"Version": "2012-10-17",
"Id": "Policy159838074858",
"Statement": [
{
"Sid": "S3access",
"Effect": "Allow",
"Principal": "*",
"Action": [
"s3:GetObject",
"s3:PutObject"
],
"Resource": "arn:aws:s3:::your bucketname/*"
}
]
}
here i just added read and update access to my s3 bucket in Action section if you need create and delete access add those actions there.
Upvotes: 2