tencent cloud

Feedback

Billable Items

Last updated: 2022-07-21 11:39:00

    Billable Items

    SCF is billed by the following parts. Each part is billed according to its statistics and calculation method, and the fees are accurate to two decimal places in USD:

    • Resource usage fees: Resource usage is calculated in GBs by multiplying the configured function memory size by the function execution duration.
    • Invocation fees: Each function triggering and execution is calculated as an invocation. HTTP-triggered functions are billed by the number of invocations in the same way.
    • Public network outbound fees: The outbound traffic consumed when the function code accesses the public network is counted as the public network outbound traffic in GB.
    • Idle provisioned concurrency fees: The number of idle instances is calculated by subtracting the number of actually running concurrent instances from the number of started provisioned instances, and the idle resource usage is calculated in GBs by multiplying the number of idle instances by the configured memory size.
    • Basic package fees: After three months of activation of SCF, you will no longer be entitled to a free tier, and the system will grant a basic package tier and automatically deduct 1.8 USD (by deducting 0.06 USD per day) every month. If you are entitled to a free tier, or you have valid packages or remaining resource packs, or the function resource usage, number of invocations, and public network outbound traffic in the last calendar month are all 0, the system will not deduct the basic package fees.
    • HTTP-triggered function response traffic fees: Counted only for HTTP-triggered functions configured with default triggers. For more information, see HTTP-Triggered Function Billing.

    For the unit prices of resource usage, invocation volume, public network outbound traffic, idle provisioned concurrency, and basic package, see Pricing. Here, the public network outbound traffic and response traffic are in GB.

    Resource Usage Fees

    *Resource usage fees = (resource usage - free tier) * resource usage unit price*

    Resource Usage (GBs)

    *Resource usage = memory configured for function * execution duration*

    Memory configured for the function is calculated in GB, and charged duration is calculated in seconds (converted from milliseconds). So resource usage is calculated in GBs (GB-second).

    For example, if a function with 256 MB memory configured is executed for 1760 ms, then the billable duration is 1760 ms, and the resource usage of this function execution will be (256/1024) * (1760/1000) = 0.44 GBs.

    Resources used in each run are calculated on an hourly basis.

    Note:

    • Currently, SCF resource usage is calculated by multiplying the configured function memory size by the actually triggered execution duration of the function. Compared with the billing method of 100-ms upward aggregation, this billing method calculates lower overall resource usage and incurs fewer fees. For more information, see Billing Example.
    • Due to issues such as the uncertainty of computing resources where SCF runs, specific actions in the code, and relevant network communications, the execution duration of the same function code may vary slightly when the code is triggered at different times.

    Invocation Fees

    *Invocation fees = (number of function invocations - free tier) * invocation unit price*

    Each function triggering and execution will be calculated as an invocation and aggregated in each hour as the hourly invocation volume. Fees will be charged per invocation.

    Public Network Outbound Traffic Fees

    *Public network outbound traffic fees = public outbound traffic * traffic unit price*

    Outbound traffic will be generated when resources are accessed over the public network in a function, such as uploading a file to an external storage space:

    • When the code writes files to the storage space provided on the public network, outbound traffic will be generated by sending files. When the code reads data or files from the storage space provided on the public network, outbound traffic will be generated only by sending requests but not by reading or downloading files.
    • If a function is configured with a VPC and writes data to a database in the VPC in its code, no outbound traffic will be generated by data writes.
    • For a function that uses an API Gateway trigger, no function outbound traffic will be generated by the data returned after the function is executed. The traffic generated by the data returned by API Gateway to the client will be calculated as the outbound traffic of and billed by API Gateway. For the billing rules of API Gateway traffic, see Pay-As-You-Go.

    Idle Provisioned Concurrency Fees

    *Idle provisioned concurrency fees = number of idle instances * configured memory size * idle duration * idle provisioned concurrency unit price*

    • Number of idle instances: SCF counts the maximum concurrency of a version at a 10-second granularity. The number of idle instances is calculated by subtracting the maximum concurrency from the number of currently started provisioned instances. The calculation formula is as follows: number of idle instances = max(number of started provisioned instances - number of concurrent instances, 0).
    • Configured memory size: The memory size configured for the provisioned concurrency of the function.
    • Idle duration: The idle duration of the provisioned concurrency.
    • Idle provisioned concurrency price: See Pricing.
    Note:

    Idle provisioned concurrency is calculated in GBs (GB-second).

    The provisioned concurrency feature only charges small idle fees for the instances that have been configured and started but are not in use, while no additional fees are charged for the instances that have been configured and are in use. In other words, only when the number of provisioned instances is greater than the number of concurrent instances for the current version will idle fees be incurred. For examples, see Provisioned Concurrency Price.

    Basic Package Fees

    • *Monthly basic package fees = number of days in the month (for example, 31 days in May or 30 days in April) * basic package price*
    • *Daily basic package fees = 1 (day) * basic package price*
    • Days: 1 day by default.
    • Basic package price: See Pricing.
    Note:

    • If you have used SCF for three months or shorter after the activation, the platform will grant a free tier by default without deducting the basic package fees.
    • If you have used SCF for more than three months after the activation, and you have valid packages or remaining resource packs, the basic package fees will not be charged.
    • On the first day of every month, the platform counts the function invocations in the last calendar month. If the function resource usage, number of invocations, and public network outbound traffic in the last month are all 0, the basic package fees will not be charged in the current month. If any function usage is generated in the current month, the basic package fees will be charged next month.

    Fees for Other Products

    If you use other products such as CMQ, CKafka, API Gateway, and COS when using SCF, fees will be calculated according to the billing rules of the actually used products.

    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support