When using OSS, you can effectively reduce costs by properly planning storage classes based on changes in your business data and utilizing subscription and pay-as-you-go strategies.
Usage notes
-
The pricing examples in this document are based on OSS pricing information published on the Alibaba Cloud website as of July 30, 2024. Due to different statistical dates, the unit prices of billing items may vary. For actual usage, please refer to the data published on the OSS pricing page.
-
The following examples only cover common storage and data request scenarios. If you use other OSS features during your operations, additional billing items may apply. For more information, see Billing items.
Verify if bucket capacity growth meets expectations
When storing data in a bucket, you are charged storage fees based on the storage capacity and storage class. You can use CloudLens to analyze your bucket usage patterns in depth, tracking key metrics such as bucket capacity to understand daily, weekly, and monthly access trends for your datasets.
If you want more detailed cost information, you can regularly check the OSS usage at the account level, export CSV usage details, and view the storage capacity data for each bucket under the current account to determine whether the storage capacity growth meets expectations. For specific steps, see Query usage at the account level.
If storage capacity growth is abnormal, you can consider using methods such as changing the ACL to private or configuring bucket policies to prevent unauthorized operations on OSS resources by other users, such as uploading many unexpected objects causing a sudden increase in storage capacity, or malicious access to objects resulting in high external network traffic costs. For more information, see Reduce the risk of unauthorized access due to account password leakage.
Reduce outbound traffic over Internet and data retrieval capacity costs for bucket owners
Suppose a bucket owner authorizes other users to access data in the bucket over the Internet and wants the requester to pay for outbound traffic over Internet and capacity fees for reading Infrequent Access data. In this case, the bucket owner can enable the pay-by-requester mode. For specific operations, see Enable pay-by-requester mode.
Outbound data transfer plans cannot be used to offset outbound traffic over Internet fees generated when requesters download data from OSS to clients over the Internet after the pay-by-requester mode is enabled. In this mode, outbound traffic fees are charged only based on actual usage.
Configure lifecycle rules
To more effectively manage and reduce your OSS costs, we recommend that you fully utilize lifecycle management policies to maximize cost efficiency.
Convert storage classes based on data access frequency and response time
When you identify decreased access frequency to your dataset or reduced requirements for immediate data retrieval, you can set reasonable lifecycle rules for the data to automatically transfer it to a more cost-effective storage class without affecting data access performance.
| Selection reference |
Scenario description |
Data access frequency |
| Standard |
For hot data requiring frequent, low-latency access. |
More than once per month per file |
| IA |
For warm data with less frequent access but requiring immediate retrieval. |
Less than once per month per file |
| Archive |
Suitable for cold data that needs to be stored for a long time, has an extremely low probability of access, but needs to be quickly retrieved when accessed. The restore time is about 1 minute. Suitable for cold data requiring long-term retention with near-zero access probability but expedited retrieval when accessed, typically restored within one minute. |
Less than once per 90 days per file |
If you set the data storage class to Archive Storage and do not enable real-time access of Archive objects, you cannot access the data in real time and must restore the data before accessing it.
You can configure lifecycle rules for specific data based on different data characteristics and usage frequencies by filtering objects using prefixes or tags. For cold data that is rarely accessed, you can automatically migrate it to more cost-effective Archive Storage. For hot data that is frequently accessed, you can keep it in the Standard storage class for faster reading speed. This not only helps optimize storage costs but also improves data access efficiency.
To help you better understand how to calculate storage costs and choose the best storage class based on your needs, we provide the following examples for your reference.
Example
User A stores all 100TB of business data (10 million objects) in a directory called "dir" in a bucket in China (Hangzhou) using the Standard ZRS storage class, mainly for the company's daily operations. In the early stages of the business, data access is very frequent. However, as the business continues to evolve, the data access patterns also change accordingly. To optimize costs, User A wants to adjust the storage class of the business data according to different business stages.
Frequent overall data access in the early stages of business
In the early stages of the business, due to frequent data access, the 100TB of data is accessed an average of 5 times per month. At this time, the user's need for data access speed is critical, so it is not advisable to choose Archive Storage, which cannot be read in real time. User A is considering continuing to use Standard storage or configuring lifecycle management rules to convert some data to Infrequent Access.
-
The cost of Standard storage is 0.15 CNY/GB/month, GET requests within 20 million are free, and those exceeding this limit are charged at 0.01 CNY/10,000 requests, with no data retrieval fees.
-
The cost of Infrequent Access is 0.10 CNY/GB/month, GET request fees are 0.1 CNY/10,000 requests per month per region, and data retrieval fees are 0.0325 CNY/GB.
Cost analysis:
| Storage class |
Total data |
Storage fee (CNY/month) |
API request fee (CNY/month) |
Data retrieval capacity fee (CNY/month) |
Total fee (CNY/month) |
| Standard ZRS |
100 TB |
15360 |
30 |
0 |
15390 |
| IA zone-redundant storage |
100 TB |
10240 |
500 |
16640 |
27380 |
From the results in the table above, it can be seen that when data is accessed frequently, Standard storage has advantages in both cost and access speed, ensuring efficient data access while avoiding additional reading fees in the Infrequent Access mode. Therefore, using Standard storage is the most suitable choice for business data at this stage.
Decreased access frequency for some data after business growth
As the business expands, although the total data storage remains at 100TB, the data access pattern changes with business development: 90% of the data (90TB) is accessed only once a month, while the remaining 10% (10TB) still maintains a high access frequency. To address this change and control costs, User A considers two strategies:
-
Continue using Standard storage: Maintain the status quo and continue using the Standard storage class.
-
Apply lifecycle rules: Convert data with reduced access frequency to the more economical Infrequent Access type to reduce storage costs.
Cost analysis:
-
We can calculate the cost of using Standard storage for all business data as shown in the following table:
Storage class
Total data
Storage fee (CNY/month)
API request fee (CNY/month)
Data retrieval capacity fee (CNY/month)
Total fee (CNY/month)
Standard ZRS
100 TB
15360
30
0
15390
-
Use lifecycle rules to filter business data that is accessed an average of once per month through prefixes or tags, amounting to 90TB. Configure this part of the data to automatically convert its storage class from Standard to Infrequent Access within 30 days after the last access. The remaining 10TB of business data still uses Standard storage.
-
Standard storage: Storage fee is 0.15 CNY/GB/month, no API request fees for GET requests within 20 million, and no data retrieval fees.
-
Infrequent Access: Storage fee is 0.10 CNY/GB/month, GET request fees are 0.1 CNY/10,000 requests per month per region, and data retrieval fees are 0.0325 CNY/GB.
Storage class
Total data
Storage fee (CNY/month)
API request fee (CNY/month)
Data retrieval capacity fee (CNY/month)
Total fee (CNY/month)
Standard ZRS
10 TB
1536
0
0
1536
IA zone-redundant storage
90 TB
9216
90
2995.2
12301.2
-
In the scenario using lifecycle rules, the total cost combining the two storage classes is 13837.2 CNY, saving about 10.1% compared to using Standard storage. Given that the access frequency has decreased, configuring lifecycle rules to convert part of the business data to the Infrequent Access type is an ideal low-cost choice, which can effectively control costs while maintaining data access speed.
Recommended action:
User A can configure lifecycle rules that specify files matching the prefix to automatically convert their storage class from Standard to Infrequent Access within 30 days after the last access, achieving a balance between cost optimization and data access speed. For specific steps, see Lifecycle rules based on the last access time.
Business maturity stage, considering long-term retention of cold data
As the business gradually matures, User A finds that the utilization rate of some business data decreases, with business data being accessed once per quarter on average. User A confirms that the demand for accessing this part of business data in the next few months is extremely low, and the user can accept a brief data restoration time. At this point, User A considers configuring lifecycle rules to convert this part of data from the current Infrequent Access to Archive Storage.
Using lifecycle rules to filter business data that is accessed once per quarter on average through prefixes or tags, amounting to 90TB. Within 30 days after the last access, automatically convert its storage class from Infrequent Access to Archive Storage. The remaining 10TB of business data still uses Standard storage due to frequent access.
-
Standard storage: Storage fee is 0.15 CNY/GB/month, no API request fees for GET requests within 20 million, and no data retrieval fees.
-
Archive Storage: Storage fee is 0.033 CNY/GB/month, GET request fees are 0.1 CNY/10,000 requests per month per region, and data retrieval capacity fees are 0.06 CNY/GB.
| Storage class |
Total data |
Storage fee (CNY/month) |
API request fee (CNY/month) |
Data retrieval capacity fee (CNY/month) |
Total fee (CNY/month) |
| Standard ZRS |
10 TB |
1536 |
0 |
0 |
1536 |
| Archive Storage ZRS |
90 TB |
3041.3 |
30 |
1843 |
4914.3 |
From the table above, it can be seen that if you further configure lifecycle rules to convert this part of business data from Infrequent Access to Archive Storage, the total cost combining the two storage classes is 6450.3 CNY, which is 53.4% lower than the cost of configuring lifecycle rules for Infrequent Access, achieving more significant cost optimization.
Recommended action
If your access pattern is known and fixed, specify all files matching the prefix in the rule, and modify the configuration to automatically convert their storage class from Standard to Infrequent Access within 30 days after the last access, and then automatically convert the data's storage class from Infrequent Access to Archive Storage 60 days after the last access. At this point, the data is automatically converted from Standard to Infrequent Access 30 days after the last access, and then to Archive Storage after another 30 days, achieving optimal storage costs. For specific steps, see Lifecycle rules based on the last access time.
Clean up previous versions of objects
After you enable versioning for a bucket, objects that are overwritten or deleted in the bucket are saved as previous versions. When a bucket accumulates many historical versions, you can combine lifecycle rules to delete unnecessary historical versions, thereby reducing storage costs.
Suggestion
We recommend that you configure lifecycle rules to automatically delete objects that have reached a specified number of days.

Through the configuration example above, OSS automatically deletes previous versions of objects that are more than 200 days from the last modification time. For specific steps, see 基于最后一次修改时间的生命周期规则.
Clean up expired fragments to reduce storage costs
If you do not call the CompleteMultipartUpload operation after multipart upload, these parts will be stored in the bucket for a long time, occupying storage capacity and generating storage fees.
Suggestion
We recommend that you configure lifecycle rules to automatically delete fragments after a specified number of days or on a specified date.

Through the configuration example above, OSS will automatically delete fragments that were generated more than 2 days ago. For specific steps, see 基于最后一次修改时间的生命周期规则.
Purchase resource plans
Before purchasing resource plans
Based on the above case analysis, User A stores 100TB of data in an OSS bucket using the Infrequent Access type, with an average access frequency of once per month, containing 10 million objects, and requiring real-time data access.
The calculated storage usage cost before purchasing resource plans is as follows:
| Storage class |
Total data |
Storage fee (0.10 CNY/month) |
Outbound traffic over Internet fee (08:00 - 24:00 (peak hours): 0.50 CNY/GB) |
Data retrieval capacity fee (0.0325 CNY/GB) |
Total fee |
| IA zone-redundant storage |
100 TB |
10240 |
51200 |
3328 |
64768 |
After purchasing resource plans
You can consider purchasing IA zone-redundant storage plans and outbound data transfer plans to offset related billing items. Billing items that cannot be offset by resource plans will use the pay-as-you-go method.
-
Offset IA zone-redundant storage capacity fees with IA zone-redundant storage plans
You can purchase a 100TB IA zone-redundant storage plan with a subscription duration of 1 month to offset IA zone-redundant storage capacity fees.
-
Offset outbound traffic over Internet fees with outbound data transfer plans
You can purchase a 100TB outbound data transfer plan to offset outbound traffic over Internet fees generated by accessing different proportions of data through the Internet.
-
IA zone-redundant storage data retrieval capacity only supports pay-as-you-go and cannot be offset by resource plans.
After using resource plans, the summarized fees are as follows:
| Storage class |
Total data |
IA zone-redundant storage plan fee |
Outbound data transfer plan fee |
Data retrieval capacity fee (0.0325 CNY/GB) |
Total fee |
| IA zone-redundant storage |
100 TB |
9216 |
43008 |
3328 |
55552 |
From the comparison in the table above, it can be seen that using a combination of resource plans and pay-as-you-go can save 14% in costs compared to using only pay-as-you-go.
Recommended action
Purchase IA zone-redundant storage plans and outbound data transfer plans. For specific operations, see Resource plan purchase guide.