When you use OSS, you can significantly reduce costs by planning storage classes around how your data is actually used and by combining subscription and pay-as-you-go billing.
Precautions
The unit prices in the following examples are taken from the detailed OSS pricing published on the Alibaba Cloud official website on July 30, 2024. Unit prices for individual billable items may differ depending on the date on which the prices were collected. Always refer to the data published on the Object Storage Service pricing page.
The following examples cover only common storage and data request scenarios. If you use other OSS features, additional billable items may apply. For more information, see Billable items.
Check whether bucket capacity growth matches your expectations
When you store data in a bucket, storage fees are charged based on the storage capacity and the storage class of the data.
For a more granular view of your costs, periodically query account-level OSS usage and export the usage details as a CSV file. The file lists the storage capacity of each bucket in the current account, which lets you judge whether capacity growth is expected. For detailed steps, see Query resource usage of an Alibaba Cloud account.
If capacity grows unexpectedly, set the ACL to private or configure a bucket policy to prevent other users from performing unauthorized operations on your OSS resources. Such operations include uploading large numbers of unwanted objects, which causes capacity to spike, and maliciously accessing objects, which generates high outbound traffic over Internet fees. For more information, see Reduce the risks of unauthorized access caused by AccessKey pair leaks.
Reduce outbound traffic over Internet and data retrieval fees for the bucket owner
Suppose a bucket owner authorizes other users to access data in the bucket over the Internet and wants the requesters to pay for outbound traffic over Internet and for the capacity fees incurred when Infrequent Access data is read. In this case, the bucket owner can enable pay-by-requester mode. For detailed steps, see Pay-by-requester.
Downstream traffic plans cannot offset the outbound traffic over Internet fees that requesters incur when they download data from OSS to a client over the Internet after pay-by-requester mode is enabled. In this mode, Internet traffic fees are charged based on actual usage only.
Configure lifecycle rules
To manage and reduce your OSS costs more effectively, we recommend that you make full use of lifecycle management policies to maximize cost efficiency.
Transition storage classes based on access frequency and response time requirements
When a dataset is accessed less often, or when real-time access to the data is no longer required, configure appropriate lifecycle rules to automatically move the data to a lower-cost storage class without affecting access performance.
|
Selection reference |
Scenario |
Data access frequency |
|
Standard |
Hot data that is accessed frequently and read in real time. |
More than once per month per object |
|
Infrequent Access |
Warm data that is accessed less frequently but must still be read in real time. |
Less than once per month per object |
|
Archive |
Cold data that must be retained for a long time and is rarely accessed, but must be retrieved quickly when it is needed. The restore time is about 1 minute. |
Less than once per 90 days per object |
If you set the storage class to Archive and do not enable real-time access of Archive objects, you cannot access the data in real time and must restore the objects before you read them.
Based on the characteristics and access frequency of your data, you can filter specific objects by prefix or tag and configure lifecycle rules for them. Cold data that is rarely accessed is automatically transitioned to lower-cost Archive storage, whereas frequently accessed hot data remains in Standard storage for faster reads. This approach optimizes storage costs and improves data access efficiency.
The following examples show how storage costs are calculated and how to choose the most suitable storage class for your requirements.
Delete previous versions of objects
After versioning is enabled for a bucket, operations that overwrite or delete data are preserved as previous versions. When a large number of previous versions accumulate in the bucket, use lifecycle rules to delete the ones you no longer need and reduce storage costs.
Recommended action
We recommend that you configure a lifecycle rule to automatically delete objects once they reach a specified age in days.
In the preceding configuration example, OSS automatically deletes previous versions of objects that were last modified more than 200 days ago. For detailed steps, see Lifecycle rules based on last modification time.
Delete expired parts to reduce storage costs
If you do not call the CompleteMultipartUpload operation to combine the parts after a multipart upload, the parts remain in the bucket indefinitely, consume storage capacity, and incur storage fees.
Recommended action
We recommend that you configure a lifecycle rule to automatically delete parts when they reach a specified age in days or on a specified date.
In the preceding configuration example, OSS automatically deletes parts that were generated more than 2 days ago. For detailed steps, see Lifecycle rules based on last modification time.