I accidentally denied everyone access to my Amazon S3 bucket. How do I regain access?
I incorrectly configured my bucket policy to deny all users access to my Amazon Simple Storage Service (Amazon S3) bucket.
"I incorrectly configured my bucket policy to deny all users access to my Amazon Simple Storage Service (Amazon S3) bucket.ResolutionConditions for the bucket policy can't be metIf the conditions for the bucket policy can't be met, then you can still regain access of your Amazon S3 bucket. To regain access to your bucket, sign in to the Amazon S3 console as the AWS account root user. Then, delete the bucket policy.Important: Don't use the root user for everyday tasks. Limit the use of these credentials to only the tasks that require you to sign in as the root user. Root credentials aren't the same as an AWS Identity Access Management (IAM) user or role with full administrator access. You can't attach IAM policies with allow or deny permissions to the root account.Sign in to the AWS Management Console as the account root user.Open the Amazon S3 console.Navigate to the incorrectly configured bucket.Choose the Permissions tab.Choose Bucket Policy.Choose Delete.On the Delete bucket policy page, enter delete into the text field to confirm the deletion of the bucket policy.Choose Delete.Sign out of the AWS Management Console.(Optional) It's a best practice for the account administrator to rotate the root user password.After the root user deletes the bucket policy, an IAM user with bucket access can apply a new bucket policy with the correct permissions. For more information, see Bucket policy examples and Adding a bucket policy by using the Amazon S3 console.Conditions for the bucket policy can be metIf you can't use the root user account, then you can delete the policy if you meet the bucket policy conditions.To regain access to your bucket, complete the following steps:Review the bucket policy to determine the conditions that are set that can be fulfilled.Take the steps to meet the bucket policy conditions.After regaining access, update the bucket policy to remove or modify the restrictive conditions to prevent future lockouts.Test the changes and make sure that the level of access control is correct.If you're unsure of the policy applied to a bucket prior to a lockout, then use AWS CloudTrail to review the event. To search for recent PutBucketPolicy actions in the account using CloudTrail, complete the following steps:Open the CloudTrail console.In the navigation pane, choose Event history.On the Event history page, under Lookup attributes, choose Event name.In the Enter an event name field, choose PutBucketPolicy and press enter.Choose the most recent event and review the details of the event. The event displays the request and response parameters. This includes the bucket name and the full bucket policy.Follow"