# Error: Error acquiring the state lock: RequestError: send request failed caused by: Post "https://s3.us-east-1.amazonaws.com/my-bucket/terraform.tfstate": dial tcp 52.95.139.7:443: i/o timeout

- **ID:** `terraform/state-lock-s3-request-timeout`
- **Domain:** terraform
- **Category:** network_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Network connectivity issues prevent Terraform from reaching the S3 bucket used for state locking, typically due to firewall rules, VPN issues, or transient AWS outages.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| Terraform v1.5 | active | — | — |
| Terraform v1.6 | active | — | — |
| Terraform v1.7 | active | — | — |
| AWS Provider v5.0+ | active | — | — |

## Workarounds

1. **Check network connectivity to S3 endpoint: run 'curl -v https://my-bucket.s3.us-east-1.amazonaws.com' to verify reachability. If blocked, add firewall rule to allow outbound HTTPS to S3 IP ranges. Then retry 'terraform apply'.** (85% success)
   ```
   Check network connectivity to S3 endpoint: run 'curl -v https://my-bucket.s3.us-east-1.amazonaws.com' to verify reachability. If blocked, add firewall rule to allow outbound HTTPS to S3 IP ranges. Then retry 'terraform apply'.
   ```
2. **If behind a proxy, set HTTP_PROXY and HTTPS_PROXY environment variables: 'export HTTPS_PROXY=http://proxy.company.com:8080' and run 'terraform init' again.** (75% success)
   ```
   If behind a proxy, set HTTP_PROXY and HTTPS_PROXY environment variables: 'export HTTPS_PROXY=http://proxy.company.com:8080' and run 'terraform init' again.
   ```

## Dead Ends

- **** — The error is a network timeout, not a stale lock. force-unlock doesn't fix connectivity and may cause state corruption if the lock is still held by another process. (95% fail)
- **** — The timeout is at the TCP level, not the S3 API level. TCP dial timeout is controlled by OS network stack, not AWS CLI settings. (80% fail)
- **** — This bypasses the lock but risks concurrent state modifications, leading to state corruption or lost updates. (60% fail)
