# PermanentRedirect: The bucket you are attempting to access must be addressed using the specified endpoint

AWS error fixes · Updated 17 November 2026

**Short answer:** The bucket lives in a different region from the endpoint your request went to, and S3 is telling you where to send it instead. Find the bucket's region with aws s3api get-bucket-location and configure your client, endpoint URL or tool for that region. The AWS CLI usually handles this automatically, so seeing it often means a pinned endpoint or a non-AWS-SDK client.

## What the error means

```
<Error>
  <Code>PermanentRedirect</Code>
  <Message>The bucket you are attempting to access must be addressed using the specified endpoint.
  Please send all future requests to this endpoint.</Message>
  <Endpoint>my-bucket.s3.eu-west-2.amazonaws.com</Endpoint>
  <Bucket>my-bucket</Bucket>
</Error>
```

The HTTP status is 301. The `Endpoint` element names the endpoint you should have used, which also tells you the bucket's region. The response often includes an `x-amz-bucket-region` header as well.

Related S3 errors with the same root cause:

- `AuthorizationHeaderMalformed: … the region 'us-east-1' is wrong; expecting 'eu-west-2'`: the request was signed for the wrong region.
- `IllegalLocationConstraintException`: on `CreateBucket`, the location constraint doesn't match the endpoint.

## Why your client hit the wrong region

| Situation | Typical cause |
|---|---|
| Custom code or SDK client | Client created with a default region (often `us-east-1`) while the bucket is elsewhere |
| `--endpoint-url` or an SDK endpoint override | A fixed regional endpoint disables the SDK's automatic region handling |
| Hadoop/Spark `s3a`, backup tools, rclone | Endpoint or region set once in config, then used for buckets in other regions |
| Plain HTTP clients using `s3.amazonaws.com` | The global endpoint without a region can't serve buckets outside `us-east-1` directly |
| Cross-region code paths | One client reused for a source bucket in one region and a destination in another |

## Fix it

1. Find the bucket's region:

   ```
   aws s3api get-bucket-location --bucket my-bucket --output text
   ```

   `None` (or an empty value) means `us-east-1`; anything else is the region code. Note that the call itself needs `s3:GetBucketLocation`.

2. Use that region in the client:

   ```
   aws s3 ls s3://my-bucket --region eu-west-2
   ```

   In code, create a separate S3 client per region, e.g. `boto3.client("s3", region_name="eu-west-2")`.

3. If you must set an endpoint explicitly (VPC interface endpoints, proxies), use the regional one that matches the bucket, for example `https://s3.eu-west-2.amazonaws.com`.

4. For tools such as `s3a`, set the bucket's region per bucket rather than a single global endpoint.

## Mistakes to avoid

- Following the 301 by hand in an HTTP client. The redirected request must be signed for the new region, so a simple redirect follow fails with a signature error.
- Copying buckets between regions with one client. Use the CLI, which handles source and destination regions, or one client per region.
- Assuming the bucket was moved. Buckets never change region; the configuration around them did.
- Hard-coding region per environment when one environment reads buckets from several regions, such as a shared artefacts bucket in `us-east-1`. Store the bucket's region next to its name in configuration.

If you get `NoSuchBucket` after fixing the region, the name itself is wrong; see [NoSuchBucket](https://cloudconsole.dev/errors/s3-nosuchbucket).

## Questions

### How do I find which region an S3 bucket is in?

Run aws s3api get-bucket-location --bucket <name>. A null or empty LocationConstraint means us-east-1; otherwise it returns the region code.

### Why do I only see PermanentRedirect in my application, not the CLI?

The AWS CLI and current SDKs detect the bucket's region and retry automatically in most cases. A pinned endpoint, an old SDK or a non-AWS client skips that logic.

### Is PermanentRedirect a permissions problem?

No. It's a 301 telling you the bucket is in a different region. Point the client at the right region and the request will be authorised as normal.

## When this happens away from your desk

Region mismatches typically appear after a new bucket or a new deployment target is added, as errors from one integration. CloudConsole, a phone app for AWS, is built to show alarms and logs across regions on your phone so these cross-region slips are easier to see.

[About the CloudConsole app](https://cloudconsole.dev/aws-console-app) · [Download on the App Store](https://apps.apple.com/app/cloudconsole-for-aws/id6835419710)

## Sources

- [Amazon S3 documentation](https://docs.aws.amazon.com/s3/)
- [GetBucketLocation - Amazon Simple Storage Service](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLocation.html)

## Related

- [NoSuchBucket: The specified bucket does not exist](https://cloudconsole.dev/errors/s3-nosuchbucket)
- [SignatureDoesNotMatch: The request signature we calculated does not match the signature you provided](https://cloudconsole.dev/errors/signaturedoesnotmatch)
- [How to change the AWS default Region](https://cloudconsole.dev/how-to/change-default-aws-region)
- [aws s3 ls](https://cloudconsole.dev/cli/s3-ls)
- [SSL validation failed for https://... certificate verify failed](https://cloudconsole.dev/errors/ssl-validation-failed)
- [AuthorizationHeaderMalformed: the region 'us-east-1' is wrong; expecting 'eu-west-2'](https://cloudconsole.dev/errors/s3-authorizationheadermalformed)

---

Source: https://cloudconsole.dev/errors/s3-permanentredirect

CloudConsole is an independent iPhone and Android app for Amazon Web Services by Cloudconcur Ltd. It is not affiliated with Amazon Web Services.
