0003-00001403

更新时间:
复制 MD 格式

Problem description

The endpoint used to access the bucket does not match the bucket's region.

Cause

The endpoint in the request targets a different region than the one where the bucket is located. OSS rejects the request and returns an AccessDenied error.

Example

A bucket named example-bucket is located in the China (Beijing) region. Its valid endpoint is example-bucket.oss-cn-beijing.aliyuncs.com. If you use the China (Hangzhou) endpoint example-bucket.oss-cn-hangzhou.aliyuncs.com instead, OSS returns the following error:

<?xml version="1.0" encoding="UTF-8"?>
<Error>
  <Code>AccessDenied</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>
  <RequestId>63F5DC133218A13939CD2940</RequestId>
  <HostId>example-bucket.oss-cn-beijing.aliyuncs.com</HostId>
  <Bucket>example-bucket</Bucket>
  <Endpoint>oss-cn-hangzhou.aliyuncs.com</Endpoint>
  <EC>0003-00001403</EC>
</Error>

The <HostId> field contains the correct endpoint for the bucket. Use that value in your next request.

Solution

Use the endpoint of the region where the bucket is located. To get the correct endpoint:

  • Read it from the error response — The <HostId> field in the error XML contains the correct endpoint. Copy that value and update your client configuration or SDK endpoint setting.

  • Look it up in the OSS console — Find the endpoint on the Overview page of the bucket.

    1. Log on to the OSS console.

    2. In the left-side navigation pane, click Buckets. On the Buckets page, click the name of the bucket that you want to access.

    3. In the left-side navigation tree, click Overview.

    4. In the Port section, find the endpoint and domain name of the bucket.

References