0005-00000201

更新时间:
复制 MD 格式

Problem description

KMS encryption is not supported for PutBucketInventory in the region where the bucket is located.

Causes

The PutBucketInventory request specifies SSE-KMS encryption in the <Encryption> node, but KMS encryption is not available in the bucket's region.

Examples

The following request fails because the <SSE-KMS> node specifies KMS encryption for the inventory destination, which is not supported in the bucket's region.

PUT /?inventory&inventoryId=report1 HTTP/1.1
Host: BucketName.oss.aliyuncs.com
Date: Mon, 31 Oct 2016 12:00:00 GMT
Authorization: authorization string
Content-Length: length
<?xml version="1.0" encoding="UTF-8"?>
<InventoryConfiguration>
   <Id>report1</Id>
   <IsEnabled>true</IsEnabled>
   <Filter>
       <Prefix>Pics/</Prefix>
       <LastModifyBeginTimeStamp>1637883649</LastModifyBeginTimeStamp>
       <LastModifyEndTimeStamp>1638347592</LastModifyEndTimeStamp>
       <LowerSizeBound>1024</LowerSizeBound>
       <UpperSizeBound>1048576</UpperSizeBound>
       <StorageClass>Standard,IA</StorageClass>
   </Filter>
   <Destination>
      <OSSBucketDestination>
        <Format>CSV</Format>
        <AccountId>100000000000000</AccountId>
        <RoleArn>acs:ram::100000000000000:role/AliyunOSSRole</RoleArn>
        <Bucket>acs:oss:::bucket_0001</Bucket>
        <Prefix>prefix1/</Prefix>
        <Encryption>
           <SSE-KMS>           <!-- This node causes the error: KMS encryption is not supported in this region -->
              <KeyId>keyId</KeyId>
           </SSE-KMS>
         </Encryption>
      </OSSBucketDestination>
   </Destination>
   <Schedule>
      <Frequency>Daily</Frequency>
   </Schedule>
   <IncludedObjectVersions>All</IncludedObjectVersions>
   <OptionalFields>
      <Field>Size</Field>
      <Field>LastModifiedDate</Field>
      <Field>ETag</Field>
      <Field>StorageClass</Field>
      <Field>IsMultipartUploaded</Field>
      <Field>EncryptionStatus</Field>
   </OptionalFields>
</InventoryConfiguration>

Solutions

Check whether KMS encryption is supported for the region of the bucket specified in the PutBucketInventory request.

References

PutBucketInventory