pavithra rox
pavithra rox

Reputation: 1086

google cloud function price calculation issue

i want to calculate the price of a google cloud function but i am a little confused with the pricing metric networking. as they say here https://cloud.google.com/functions/pricing#networking

The amount of data transferred out of your function each time it is invoked.

is calculated as networking. lets say i deploy my cloud function on google cloud and some one calling that cloud function from an application that has hosted on their own servers. and my cloud function send the result of 20kb. is this also counted as networking. will google cost me for this as well?

Upvotes: 2

Views: 1227

Answers (2)

Yurci
Yurci

Reputation: 576

You can export billing data to BigQuery[1] then obtain Network Egress for Cloud Functions by running this query:

SELECT usage_amount, usage_unit

FROM billing_data_table

WHERE sku.id='B068-6B82-C017' OR sku.id=’4BAF-1AD8-483C’

Cloud Functions Network Egress ‘sku.id’s are 4BAF-1AD8-483C for global, and B068-6B82-C017 for us-central-1[2].

Upvotes: 2

ScottMcC
ScottMcC

Reputation: 4460

Yes that's correct you're charged for any outbound traffic that moves outside of Google's Network.

Depending on your usage you may sit underneath the free tier range for network traffic. Quoting from the Networking pricing page.

Cloud Functions provides a perpetual free tier for compute-time resources, which includes an allocation of both GB-seconds and GHz-seconds. In addition to the 2 million invocations, the free tier provides 400,000 GB-seconds, 200,000 GHz-seconds of compute time and 5GB of Internet egress traffic per month. Note that even for free tier usage, we require a valid billing account.

Upvotes: 2

Related Questions