0020-00000041

Updated at:

Problem description

Your PutBucketInventory request failed because the bucket contains more than 50 billion objects, which exceeds the limit for weekly inventory exports.

Causes

Weekly inventory exports require the bucket to contain fewer than 50 billion objects. When a bucket exceeds this limit, OSS rejects the PutBucketInventory request.

Examples

The following request triggers this error. The bucket oss-example contains more than 50 billion objects, and <Frequency> is set to Weekly.

PUT /?inventory&inventoryId=report1 HTTP/1.1
Host: oss-example.oss-cn-hangzhou.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:::destbucket</Bucket>
        <Prefix>prefix1/</Prefix>
        <Encryption>
           <SSE-KMS>
              <KeyId>keyId</KeyId>
           </SSE-KMS>
         </Encryption>
      </OSSBucketDestination>
   </Destination>
   <Schedule>
      <Frequency>Weekly</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

Choose one of the following approaches:

  • Export by prefix in batches. Use the <Prefix> filter to split the inventory scope across multiple configurations, each targeting a subset of objects. This keeps each configuration within the 50-billion-object limit.

  • Request a limit increase. Submit a ticket to request an increase to the number of inventory lists that can be exported.

References

PutBucketInventory