0032-00000010

Updated at:

Problem description

The PutBucketLogging request fails because the destination bucket is in a different region than the source bucket.

Causes

The TargetBucket parameter must specify a bucket in the same region as the source bucket. OSS rejects requests where the two buckets are in different regions.

Examples

The following request fails because Bucket-Other-Region is in a different region than ExampleBucket:

PUT /?logging HTTP/1.1
Host: ExampleBucket.oss-cn-hangzhou.aliyuncs.com
Date: GMT Date
Content-Length: ContentLength
Content-Type: application/xml
Authorization: SignatureValue

<?xml version="1.0" encoding="UTF-8"?>
<BucketLoggingStatus>
    <LoggingEnabled>
        <TargetBucket>Bucket-Other-Region</TargetBucket>
        <TargetPrefix>TargetPrefix</TargetPrefix>
    </LoggingEnabled>
</BucketLoggingStatus>

Solutions

Set TargetBucket to a bucket in the same region as the source bucket.

PUT /?logging HTTP/1.1
Host: ExampleBucket.oss-cn-hangzhou.aliyuncs.com
Date: GMT Date
Content-Length: ContentLength
Content-Type: application/xml
Authorization: SignatureValue

<?xml version="1.0" encoding="UTF-8"?>
<BucketLoggingStatus>
    <LoggingEnabled>
        <TargetBucket>TargetBucket</TargetBucket><!-- Must be in the same region as ExampleBucket -->
        <TargetPrefix>TargetPrefix</TargetPrefix>
    </LoggingEnabled>
</BucketLoggingStatus>

In this example, TargetBucket and ExampleBucket must both be in the same region.

References