Billing Examples
Billing Scenario I
A user created functions A, B, and C in April, as shown in Table 1. Assume that the total number of executions of these three functions in April was 2 million, 100,000, and 100,000. How much was the user billed for the three functions in April?
Function |
Description |
---|---|
Function A (not using reserved instances) |
Created on April 5, 2023. Assume that the memory of function A is 512 MB and the execution duration is 0.5s. |
Function B (using reserved instances and idle mode disabled) |
Created on April 18, 2023. Assume that the memory of function B is 128 MB and the execution time is 10s. If function B was deleted on April 30, 2023, the running duration of function B is 12 days. |
Function C (using reserved instances and idle mode enabled) |
Created on April 20, 2023. Assume that the memory of function C is 128 MB and the execution time is 5s. If function C was deleted on April 30, 2023, the running duration of function C is 10 days. |
Billing Analysis (Scenario I)
Functions A, B, and C are billed separately since they use different types of instances. For details, see Table 2.
Billing Item |
Billing Details |
---|---|
Price for requests |
(2 million requests + 100,000 requests + 100,000 requests – 1 million requests) x = |
Price for execution duration |
Total execution duration of function A: 512 MB/1024 MB x 1s x 2 million requests = 1 million GB-seconds. Total execution duration of function B: 128 MB/1024 MB x (12 x 24 x 60 x 60) = 129,600 GB-seconds. The execution duration of function C is divided into two parts:
Price for execution duration of functions A, B, and C: x (1 million GB-seconds + 129,600 GB-seconds + 62,500 GB-seconds – 400,000 GB-seconds) + 45, 500 GB-seconds x = |
Total |
Price for requests + Price for execution duration = + = ≈ |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.