This topic provides real-world scenarios to explain how Object Storage Service (OSS) costs are calculated and help you understand typical OSS usage expenses.
Notes
The unit prices in the following examples are based on the OSS pricing details published on the Alibaba Cloud official website as of November 20, 2024. For the latest pricing, see the Alibaba Cloud official website.
Example 1: Distributing static resources from OSS (frequent access)
In October 2024, Mr. Li plans to create an OSS bucket in the China (Hangzhou) region to host a static website. The bucket will store approximately 505 GB of data, primarily HTML, CSS, and JavaScript files, using the Standard ZRS storage class. Based on expected user behavior, Mr. Li estimates that between 8:00 AM and 12:00 AM daily, his site will receive an average of 1,000 GET requests per hour. Additionally, during this period, about 5 GB of data will be transferred daily from OSS to clients for page views or resource downloads. His total monthly cost is approximately CNY 151.47, broken down as follows:
Operation | Billed item | Item code | Unit price | Usage | Cost |
Stored 505 GB of files using Standard ZRS | Standard ZRS capacity | StorageZRS | CNY 0.15/GB/month | 505 GB/month | CNY 75.75 |
Averaged 1,000 GET requests per hour | Number of GET requests | GetRequest | CNY 0.01 per 10,000 requests | 1,000 requests/hour × 24 hours × 30 days | CNY 0.72 |
Approximately 5 GB of outbound traffic over Internet daily from 8:00 AM to 12:00 AM | Outbound traffic over Internet | NetworkOut | CNY 0.50/GB | 5 GB/day × 30 days | CNY 75 |
Example 2: Distributing static resources from OSS (infrequent access)
On October 1, 2024, Mr. Zhang stored 100 GB of data as Infrequent Access ZRS in a bucket in the China (Hangzhou) region. The bucket contains 10,000 files, each 30 KB in size. These files are rarely accessed or modified. However, on October 20, because of an urgent business requirement, he needed to immediately process a large 1 GB file. He downloaded the file from OSS to his local machine, updated its content, and then re-uploaded the updated 1 GB file to OSS to ensure its timely availability. His total monthly cost was approximately CNY 10.5975, detailed as follows:
Operation | Billed item | Item code | Unit price | Usage | Cost |
Stored 100 GB of files using Infrequent Access ZRS | Infrequent Access ZRS capacity | ChargedDatasizeZRS | CNY 0.10/GB/month | 100.32 GB/month① | CNY 10.032 |
Downloaded a 1 GB file to local machine | Outbound traffic over Internet | NetworkOut | CNY 0.50/GB | 1 GB | CNY 0.5 |
Infrequent Access data retrieval capacity | RetrievalData | CNY 0.0325/GB | 1 GB | CNY 0.0325 | |
Re-uploaded the updated 1 GB file to OSS on October 20 | Infrequent Access ZRS capacity stored for less than minimum duration | LessthanMonthDatasizeZRS | CNY 0.10/GB/month | 1 GB stored for 10 days② | CNY 0.033 |
① Each file stored as Infrequent Access ZRS is billed for a minimum of 64 KB. Files smaller than 64 KB are billed as 64 KB. Therefore, 10,000 files of 30 KB each result in additional billed storage of 10,000 × (64 − 30) KB, which is approximately 0.32 GB. The total billed storage is 100 GB + 0.32 GB = 100.32 GB.
② On October 20, uploading a file with the same name overwrote the original object in OSS. Because Infrequent Access objects must be stored for at least 30 days, overwriting or deleting them before this period incurs storage fees for the remaining days, which is 10 days in this case.
Example 3: Accelerating OSS static resource distribution with CDN
In October 2024, Mr. Zhang stored static resources in OSS and enabled Alibaba Cloud CDN to accelerate access. During this period, 90 GB of data was delivered directly from CDN edge nodes to clients. When a CDN edge node needed to update or retrieve a file for the first time, it pulled the latest version from OSS, which generated 60 GB of back-to-origin traffic. Additionally, CDN edge nodes invoked the OSS API 10,000 times to retrieve or verify file metadata. His total monthly cost was CNY 30.61, detailed as follows:
Operation | Billed item | Item code | Unit price | Usage | Cost |
Data transferred from CDN edge nodes to clients | CDN outbound traffic | cdn_flow_out | CNY 0.24/GB | 90 GB | CNY 21.6 (charged by CDN) |
Data transferred from OSS to CDN edge nodes | CDN back-to-origin traffic | CdnOut | CNY 0.15/GB | 60 GB | CNY 9 (charged by OSS) |
OSS API requests triggered by CDN edge node access | GET requests | GetRequest | CNY 0.01 per 10,000 requests | 10,000 times | CNY 0.01 (charged by OSS) |
Example 4: Long-distance transfer acceleration with OSS
In September 2024, Mr. Li deployed a globally accessible application that used a bucket in the China (Hangzhou) region. The application's data, which included videos and high-definition images totaling 2 TB, was stored as Standard ZRS for data security and reliability. To improve the access experience for users outside the Chinese mainland, especially for downloading or streaming large files, he enabled OSS transfer acceleration. Using the acceleration endpoint significantly reduced data transfer latency and improved response speed. His total monthly cost was CNY 3,891.20, detailed as follows:
Operation | Billed item | Item code | Unit price | Usage | Cost |
Stored 2 TB of files using Standard ZRS | Standard ZRS capacity | StorageZRS | CNY 0.15/GB/month | 2 TB/month | CNY 307.20 |
Accessed resources in China (Hangzhou) from outside the Chinese mainland via acceleration endpoint | Transfer acceleration AccO2MOut | AccO2MOut | CNY 1.25/GB | 2 TB | CNY 2,560 |
Outbound traffic over Internet | NetworkOut | CNY 0.50/GB | 2 TB | CNY 1,024 |
Example 5: Accessing OSS from an ECS instance
In September 2024, Mr. Wang stored 1 TB of files as Standard ZRS in a bucket in the China (Hangzhou) region. In the same month, an Alibaba Cloud ECS instance in the same region accessed these files using OSS internal endpoints. This access generated 100 GB of outbound traffic over the internal network and approximately 100,000 GET requests to retrieve or view file content. This approach improved data access speed and reduced outbound traffic costs. His total monthly cost was CNY 153.70, detailed as follows:
Operation | Billed item | Item code | Unit price | Usage | Cost |
Stored 1 TB of files using Standard ZRS | Standard ZRS capacity | StorageZRS | CNY 0.15/GB/month | 1 TB/month | CNY 153.60 |
Accessed bucket resources using internal endpoint | Outbound traffic over internal network | Not applicable | Free | 100 GB | CNY 0 |
GET requests generated by accessing bucket resources | GET requests | GetRequest | CNY 0.01 per 10,000 requests | 100,000 requests | CNY 0.10 |
Example 6: Cross-region disaster recovery with OSS
On October 1, 2024, Mr. Wang stored 100 GB of files as Standard ZRS in Bucket A in the China (Hangzhou) region. Starting October 2, 3 GB of new files were added to Bucket A daily. To enhance data security and reliability and prevent data loss or service interruptions from a single-region failure, he configured cross-region replication to synchronize data to Bucket B in the China (Shanghai) region. This configuration ensures business continuity if a region experiences a natural disaster, power outage, or other unforeseen issue. Buckets A and B together handled an average of 20,000 daily requests, including PUT and GET requests. His total monthly cost was approximately CNY 140.19, detailed as follows:
Operation | Billed item | Item code | Unit price | Usage | Cost |
Bucket A stored 100 GB of Standard ZRS files | Standard ZRS capacity | StorageZRS | CNY 0.15/GB/month | 100 GB/month | CNY 15 |
Bucket B stored 100 GB replicated from Bucket A via cross-region replication | Standard ZRS capacity | StorageZRS | CNY 0.15/GB/month | 100 GB/month | CNY 15 |
Bucket A added 3 GB of new files daily | Standard ZRS capacity | StorageZRS | 0.005 CNY/GB/day (CNY 0.15/GB/month ÷ 30 days) | The 3 GB of data added on October 2 has a retention period of 30 days. The 3 GB of data added on October 3 was stored for 29 days. ... The 3 GB of data added on October 31 was stored for 1 day. | 6.975 CNY (3 GB × CNY 0.005/GB/day × 30 days + 3 × 0.005 × 29 + 3 × 0.005 × 28 + ... + 3 × 0.005 × 1) |
Daily 3 GB additions in Bucket A replicated to Bucket B | Standard ZRS capacity | StorageZRS | CNY 0.005/GB/day (CNY 0.15/GB/month ÷ 30 days) | The 3 GB of data added on October 2 was retained for 30 days. The 3 GB of data added on October 3 was stored for 29 days. ... The 3 GB of data added on October 31 was stored for 1 day. | 6.975 CNY (3 GB × CNY 0.005/GB/day × 30 days + 3 × 0.005 × 29 + 3 × 0.005 × 28 + ... + 3 × 0.005 × 1) |
Replicated data from Bucket A to Bucket B via cross-region replication | Cross-region replication traffic | ReplicationDatasize | CNY 0.50/GB | October 1 100 GB 3 GB per day from October 2 to October 31 | 95 CNY (100 GB × CNY 0.5/GB + 3 GB/day × CNY 0.5/GB × 30 days) |
Bucket A averaged 20,000 read/write requests daily | PUT requests | PutRequest | CNY 0.01 per 10,000 requests | 620,000 occurrences | CNY 0.62 |
GET requests | GetRequest | ||||
Bucket B averaged 20,000 read/write requests daily | PUT requests | PutRequest | CNY 0.01 per 10,000 requests | 620,000 requests | CNY 0.62 |
GET requests | GetRequest |
Example 7: Automatic data dump and cleanup in OSS
Scenario 1: Data transitioned from Standard to Archive, then deleted
On September 1, 2024, Mr. Wang stored 1.5 million files, all larger than 64 KB and totaling 100 GB, in a bucket in the China (Hangzhou) region. All files were placed in the dir directory. To manage the data based on changing access patterns, he configured the following lifecycle rule:
Phase 1: Store all files in the
dirdirectory as Standard ZRS for frequent initial access. Duration: 10 days.Phase 2: Transition all files in the
dirdirectory to Infrequent Access ZRS because of low access frequency (less than once per file per month), while maintaining immediate accessibility. Duration: 25 days.Phase 3: Transition all files in the
dirdirectory to Archive ZRS because access drops to less than once per file every 90 days. Duration: 5 days.Phase 4: Delete all files in the
dirdirectory after they are stored as Archive ZRS for 5 days, because they are no longer needed.
For this scenario, his total monthly cost was CNY 32.575, detailed as follows:
Operation | Billed item | Item code | Unit price | Usage | Cost |
100 GB stored as Standard ZRS for 10 days | Standard ZRS capacity | StorageZRS | CNY 0.15/GB/month | 100 GB stored for 10 days | CNY 4.995 |
100 GB stored as Infrequent Access ZRS for 25 days | Infrequent Access ZRS capacity | ChargedDatasizeZRS | CNY 0.10/GB/month | 100 GB stored for 25 days | CNY 8.33 |
100 GB stored as Archive ZRS for 5 days | Archive ZRS capacity | ChargedDataSizeArcZRS | CNY 0.033/GB/month | 100 GB stored for 5 days | CNY 0.55 |
A 100 GB file is stored in Archive (zone-redundant storage) and deleted after 5 days. | Archive ZRS capacity stored for less than minimum duration | LessthanMonthDatasizeArcZRS | CNY 0.033/GB/month | 100 GB stored for 20 days⑤ | CNY 2.20 |
A lifecycle transition to a different storage class is a request operation. | Standard to Infrequent Access request fee | PUT requests | CNY 0.01 per 10,000 requests | 1.5 million times | CNY 1.50 |
Infrequent Access to Archive request fee | PUT requests | CNY 0.10 per 10,000 requests | 1.5 million times | CNY 15 |
⑤ Archive ZRS requires a minimum storage duration of 60 days. This duration is calculated from the object's Last-Modified time, which is when it was initially stored as Standard. Therefore, this scenario incurs early deletion fees equivalent to 20 days (60 − 10 − 25 − 5) of storage.
Scenario 2: Data transitioned from Infrequent Access to Cold Archive, then deleted
On September 1, 2024, Mr. Zhang stored 25 million files, all larger than 64 KB and totaling 2.5 TB, in a bucket in the China (Hangzhou) region. All files were placed in the dir directory. To manage the data based on evolving access needs, he set the following lifecycle rule:
Phase 1: Store all files in the
dirdirectory as Infrequent Access LRS because of low access frequency (less than once per file per month), while ensuring immediate access. Duration: 100 days.Phase 2: Transition all files in the
dirdirectory to Archive LRS because access drops to less than once per file every 90 days. Duration: 200 days.Phase 3: Transition all files in the
dirdirectory to Cold Archive LRS because access drops to less than once per file per year. Duration: 5 days.Phase 4: Delete all files in the
dirdirectory after they are stored as Cold Archive LRS for 5 days, because they are no longer needed.
For this scenario, his total cost was CNY 1,976.30, detailed as follows:
Operation | Billed item | Item code | Unit price | Usage | Cost |
2.5 TB stored as Infrequent Access LRS for 100 days | Infrequent Access LRS capacity | ChargedDatasize | CNY 0.08/GB/month | 2.5 TB stored for 100 days | CNY 682.70 |
2.5 TB stored as Archive LRS for 200 days | Archive LRS capacity | ChargedDatasize | CNY 0.033/GB/month | 2.5 TB stored for 200 days | CNY 563.20 |
2.5 TB stored as Cold Archive LRS for 5 days | Cold Archive LRS capacity | ChargedDatasizeCA | CNY 0.015/GB/month | 2.5 TB stored for 5 days | CNY 6.40 |
2.5 TB of files are deleted from Cold Archive LRS after 5 days. | Cold Archive LRS capacity stored for less than minimum duration | ChargedDatasizeDeepCA | CNY 0.015/GB/month | 2.5 TB storage for 175 days⑤ | CNY 224 |
Lifecycle transitions triggered request operations | Infrequent Access to Archive request fee | PUT requests | CNY 0.10 per 10,000 requests | 25 million invocations | CNY 250 |
Archive to Cold Archive request fee | PUT requests | CNY 0.10 per 10,000 requests | 25 million requests | CNY 250 |
⑦ Cold Archive LRS requires a minimum storage duration of 180 days, calculated from the time the object is transitioned to Cold Archive. Therefore, this scenario incurs early deletion fees equivalent to 175 days of storage.
To avoid early deletion fees, you must understand the minimum storage period for each storage class and ensure your objects meet this requirement before you transition or delete them. For more information, see How to avoid early deletion fees.
Example 8: Restoring extremely cold OSS data
On October 1, 2024, Mr. Wang stored approximately 600 million files totaling 900 TB in a bucket in the China (Hangzhou) region as Deep Cold Archive. This is the lowest-cost storage class for long-term data retention with infrequent access. Because of changing business needs, he now needs to access a subset of these files: 45 TB of data (5% of the total capacity), which comprises 30 million files. Because objects in Deep Cold Archive must be restored before they can be read, he initiated a restore operation. He specified a 10-day restore window, during which OSS generates a temporary copy of the data for access.
His monthly costs for this scenario are as follows:
Standard retrieval
With standard retrieval, the total cost is CNY 7,682.64.
Operation | Billed item | Item code | Unit price | Usage | Cost |
Restored 30 million files (5% of 900 TB) | Deep Cold Archive standard retrieval requests | DeepCAStdRetrievalRequest | CNY 1.67 per 10,000 requests | 30 million requests | CNY 5,010 |
Deep Cold Archive standard retrieval capacity | DeepCAStdRetrievalData | CNY 0.018/GB | 45 TB | 829.44 | |
Generated a temporary copy for 10-day access during restore window | Temporary storage capacity | TempStorageCAStd | CNY 0.12/GB/month | 45 TB stored for 10 days⑤ | CNY 1,843.20 |
High-priority retrieval
With high-priority retrieval, the total cost is CNY 28,833.60.
Operation | Billed item | Item code | Unit price | Usage | Cost |
Restored 30 million files (5% of 900 TB) | Deep Cold Archive high-priority retrieval requests | DeepCAHighPriorRetrievalRequest | CNY 7 per 10,000 requests | 30 million requests | CNY 21,000 |
Deep Cold Archive high-priority retrieval capacity | DeepCAHighPriorRetrievalData | CNY 0.13/GB | 45 TB | CNY 5,990.40 | |
Generated a temporary copy for 10-day access during restore window | Temporary storage capacity | TempStorageCAStd | 0.12 GB/month | 45 TB stored for 10 days⑥ | CNY 1,843.20 |
⑥ A temporary copy of the data is generated for a 10-day access window. Therefore, the 45 TB of data incurs temporary storage fees for 10 days.
For more information about how to use Deep Cold Archive cost-effectively, see Best practices for Deep Cold Archive.