Questo contenuto non è disponibile nella lingua selezionata
Lavoriamo costantemente per rendere disponibili i contenuti nella lingua selezionata. Ti ringraziamo per la comprensione.
I accidentally denied everyone access to my Amazon S3 bucket. How do I regain access?
3 minuti di lettura
I incorrectly configured my bucket policy to deny all users access to my Amazon Simple Storage Service (Amazon S3) bucket.
Conditions for the bucket policy can't be met
If 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.
If 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: