# Error: Failed to load state: S3 bucket "my-terraform-state" does not exist

- **ID:** `terraform/s3-backend-bucket-not-found`
- **Domain:** terraform
- **Category:** resource_error
- **Verification:** ai_generated
- **Fix Rate:** 90%

## Root Cause

The S3 bucket specified in the backend configuration for state storage has not been created or has been deleted.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| Terraform v1.5.0 | active | — | — |
| Terraform v1.6.0 | active | — | — |
| Terraform v1.7.0 | active | — | — |

## Workarounds

1. **Create the S3 bucket manually with the correct name and region: `aws s3api create-bucket --bucket my-terraform-state --region us-east-1 --create-bucket-configuration LocationConstraint=us-east-1`** (95% success)
   ```
   Create the S3 bucket manually with the correct name and region: `aws s3api create-bucket --bucket my-terraform-state --region us-east-1 --create-bucket-configuration LocationConstraint=us-east-1`
   ```
2. **Update the backend configuration to point to an existing bucket, then run 'terraform init -reconfigure'** (90% success)
   ```
   Update the backend configuration to point to an existing bucket, then run 'terraform init -reconfigure'
   ```

## Dead Ends

- **Run 'terraform init' with -migrate-state flag** — The bucket still doesn't exist; migrate requires an existing bucket. (95% fail)
- **Change the bucket name in the backend block to a random new name** — The new bucket also doesn't exist unless created manually. (80% fail)
- **Use local backend by removing the backend block** — This changes the state location and may lose remote state history. (70% fail)
