`BucketAlreadyExists: The requested bucket name is not available. The bucket namespace is shared by all users of the system.`
BeginnerTroubleshootingS3, EBS and EFS
Answer
Likely causes → S3 bucket names are global across all AWS accounts, and another account already owns this name. If you own it, you get BucketAlreadyOwnedByYou instead. That error is common when IaC re-runs a create in a different Region.
Diagnose →
aws s3api head-bucket --bucket my-app-logs # 403 = exists in someone else's account, 404 = free
aws s3api list-buckets --query "Buckets[?Name=='my-app-logs']"
Fix →
- Pick a unique name, for example with the account ID and Region:
my-app-logs-111111111111-us-east-1 - For
BucketAlreadyOwnedByYou, import the bucket into state instead of creating it
Prevent → Use a naming convention with the account and Region in it, or the S3 account-regional namespace option where it is available. Never rely on a deleted name being free again.
More on S3, EBS and EFS
`PermanentRedirect: The bucket you are attempting to access must be addressed using the specified endpoint.`BeginnerA partner account uploads objects into your bucket, but your own admins get `403 Forbidden` reading them.Intermediate`aws s3 cp` gets `An error occurred (AccessDenied) when calling the GetObject operation` but the IAM policy allows `s3:GetObject` and the bucket policy is fine.IntermediateAn S3 static website endpoint returns `403 Forbidden` with `Code: AccessDenied`.IntermediateHigh-throughput writes get `503 SlowDown: Please reduce your request rate.`Intermediate`BucketNotEmpty: The bucket you tried to delete is not empty. You must delete all versions in the bucket.` even after `aws s3 rm --recursive`.Beginner