If you enable real-time access of Archive objects for an Object Storage Service (OSS) bucket, you can access Archive objects in the bucket without the need to restore the Archive objects. This feature is suitable for real-time access of extremely infrequently accessed data. This topic describes how to enable and use real-time access of Archive objects.
Prerequisites
A region-specific bucket is created. For more information, see Create a bucket.
A RAM user is granted the following permissions if you want to use the RAM user to access Archive objects in real time without the need to restore them:
oss:PutBucketArchiveDirectRead
andoss:GetBucketArchiveDirectRead
. For more information, see Attach a custom policy to a RAM user.
Limits
Real-time access of Archive objects can be used to access only Archive objects without the need to restore them.
When you enable real-time access of Archive objects for a bucket, if you use the static website hosting feature to host a static website on the bucket and set the default homepage and the default 404 page of the static website to an Archive object that is not restored in the bucket, the default homepage or the default 404 page cannot be accessed and the 403 error code is returned. To ensure that the static website can be accessed, we recommend that you set the default homepage and default 404 page to Standard objects.
Scenarios
Real-time access of Archive objects is suitable for scenarios that involve data lakes, cloud photo albums, media asset archiving, and medical images. Real-time access of Archive objects meets the requirements for real-time access of data that is extremely infrequently accessed while reducing the overall storage costs.
Billing rules
After you enable real-time access of Archive objects for a bucket, when you access Archive objects that are not restored in the bucket, you are charged Archive data retrieval fees based on the size of accessed Archive data (RetrievalDataArchiveDirect). When you access Archive objects that are restored in the bucket, you are not charged Archive data retrieval fees. For more information, see Data processing fees.
The size of directly accessed Archive data depends on the data range specified in the request headers when an HTTP connection is established. Early disconnection does not affect the size of directly accessed data that has been requested. For example, if disconnection occurs after 1 byte of data is read, and the data range specified in the request is 100 MB~200 MB, the size of directly accessed Archive data is calculated as 100 MB~200 MB.
When you process archived images after real-time access of Archive objects is enabled, you are charged for the size of the source image instead of the actual size of the processed image. In this case, even if the processed image significantly reduces the actual bandwidth used during transmission, you are still charged Archive data retrieval fees based on the size of the source image. For example, you are charged for 1 GB of accessed Archive data if you scale an image from 1GB to 100KB.
Feature comparison
The following table describes the differences before and after you enable real-time access of Archive objects.
Item | Disable real-time access of Archive objects (default) | Enable real-time access of Archive objects |
Data retrieval method | Restore Archive objects and then access the Archive objects | Directly access Archive objects |
Data retrieval fees ① | Low | High |
Data retrieval time | Minutes | Milliseconds |
① For more information about data retrieval fees, visit the OSS pricing page.
Procedure
Use the OSS console
Use the OSS API
What to do next
After you enable real-time access of Archive objects for a bucket, you can perform the following operations on the Archive objects in the bucket without the need to restore them:
References
If you do not enable real-time access of Archive objects for the bucket, you must restore the Archive objects before you can access them. For more information, see Restore objects.