# BucketAlreadyExists: The requested bucket name is not available

**Code:** `BucketAlreadyExists` · **Category:** AWS · **Seen on:** AWS

S3 bucket names are global across all AWS accounts, and someone else already uses this one.

## Meaning

BucketAlreadyExists means another account owns the name; BucketAlreadyOwnedByYou means you already created it (often in IaC re-runs). Deleted bucket names can take time to become available again.

## Common causes

- Name taken by another AWS account
- You already own the bucket (BucketAlreadyOwnedByYou)
- Recently deleted bucket name not yet released

## Quick fix

1. Choose a unique name (add account ID/region/random suffix)
2. Import the existing bucket into Terraform/CloudFormation instead of creating it
3. Treat BucketAlreadyOwnedByYou as success in scripts

## Detailed fix by platform

### AWS CLI

1. `aws s3api create-bucket --bucket myapp-assets-123456789012-euw1 --region eu-west-1 --create-bucket-configuration LocationConstraint=eu-west-1`

## How to diagnose

1. **Owner** — aws s3api head-bucket --bucket name (403 = someone else, 200 = yours)
2. **IaC** — Bucket created outside the stack?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/aws/bucketalreadyexists)
