Cloud Functions Beta

A serverless environment to build and connect cloud services

Try It Free View Documentation

Serverless Applications on Google’s Infrastructure

Cloud computing has made possible fully serverless models of computing where logic can be spun up on-demand in response to events originating from anywhere. Construct applications from bite-sized business logic billed to the nearest 100 milliseconds, only while your code is running. Serve users from zero to planet-scale, all without managing any infrastructure.

Microservices Over Monoliths

Developer agility comes from building systems composed of small, independent units of functionality focused on doing one thing well. Cloud Functions lets you build and deploy services at the level of a single function, not at the level of entire applications, containers, or VMs.

Connect & Extend Cloud Services

Cloud Functions provides a connective layer of logic that lets you write code to connect and extend cloud services. Listen and respond to events such as a file upload to Cloud Storage, an incoming message on a Cloud Pub/Sub topic, a log change in Stackdriver Logging, or a mobile-related event from Firebase. Cloud Functions augments existing cloud services and allows you to address an increasing number of use cases with event-driven code.

Serverless Economics

Cloud Functions are ephemeral, spinning up on-demand and back down in response to events in the environment. Pay only while your function is executing, metered to the nearest 100 milliseconds, and pay nothing after your function finishes.

Mobile Ready

Mobile app developers can use Cloud Functions directly from Firebase, Google Cloud’s mobile platform. Firebase natively emits events to which Cloud Functions can respond, including from Firebase Analytics, Realtime Database, Authentication, and Storage.

Just Add Code

Run in a fully-managed, serverless environment where Google handles infrastructure, operating systems, and runtime environments completely on your behalf. Each Cloud Function runs in its own isolated secure execution context, scales automatically, and has a lifecycle independent from other functions.

Open and Familiar

Cloud Functions are written in JavaScript and execute in a standard Node.js runtime environment. We don’t assume anything proprietary all the way down to the operating system, which means your functions will just work—including native libraries you bring to the platform. Discover a superior, open developer experience that comes from working hand-in-hand with the Node.js Foundation, with our Google colleagues and with the community through the open source V8 engine.

Cloud Functions Use Cases

Mobile Backend
Use Google’s mobile platform for app developers, Firebase, and extend your mobile backend with Cloud Functions. Listen and respond to events from Firebase Analytics, Realtime Database, Authentication, and Storage
APIs & Microservices
Compose applications from lightweight, loosely coupled bits of logic that are quick to build and scale automatically. Your functions can be event-driven or invoked directly over HTTP/S
Data Processing / ETL
Listen and respond to Cloud Storage events such as when a file is created, changed, or removed. Process images, do video transcoding, validate or transform data, and invoke any service on the Internet from your Cloud Function
Webhooks
Via a simple HTTP trigger, respond to events originating from 3rd party systems like GitHub, Slack, Stripe, or from anywhere that can send HTTP/S requests
IoT
Imagine tens or hundreds of thousands of devices streaming data into Cloud Pub/Sub automatically launching Cloud Functions to process, transform and store data. Cloud Functions lets you do this in a way that’s completely serverless

“We wanted to improve developer productivity at Meetup by integrating task management with Slack. Google Cloud Functions made this integration as simple as publishing a new HTTP function. We’ve now rolled the tool out across the entire organization without ever touching a server or VM.”

— Jose Rodriguez Lead of Engineering Effectiveness, Meetup

“Semios uses Google Cloud Functions as a critical part of our data ingestion pipeline, which asynchronously aggregates micro-climate telemetry data from our IoT network of 150,000 in-field sensors to give growers real-time insights about their orchards.”

— Maysam Emadi Data Scientist, Semios

Cloud Functions Features

Cloud Pub/Sub Triggers
Cloud Functions can be triggered by messages on a Cloud Pub/Sub topic, and multiple functions can subscribe to the same topic
Cloud Storage Triggers
You can associate a Cloud Function to mutation events on a Cloud Storage bucket. Every time a file in your bucket is created, deleted or modified, your function will execute
Firebase Triggers
Mobile developers will find first-class integration between Firebase and Cloud Functions. See the events exposed by Firebase here
HTTP/S Invocation
Functions deployed with an HTTP trigger are given a fully qualified domain together with a dynamically generated TLS certificate for secure communication
GitHub/Bitbucket
Using Cloud Source Repositories you can deploy Cloud Functions directly from your Github or Bitbucket repository without needing to upload code or manage versions yourself
Logging, Monitoring & Debugging
Logs emitted from your Cloud Functions are automatically written to Stackdriver Logging and performance telemetry is recorded in Stackdriver Monitoring. Stackdriver Debugger lets you investigate your code’s behavior in production
Automatic Dependency Resolution
You don't need to package up your entire function along with its dependencies for deployment. Send us your source code and your manifest and we'll do the rest

Cloud Functions Pricing

Google Cloud Functions charges for invocations, compute time, and outbound data. Inbound data, and outbound data to other Google APIs in the same region is free. For detailed pricing information, please view the pricing guide.

  Free Limit Per Month Price Above Free Limit (per Unit) Price Unit
Invocations * 2 million invocations $0.40 per million invocations
Compute Time 400,000 GB-seconds $0.0000025 per GB-Second
200,000 GHz seconds $0.0000100 per GHz-Second
Outbound Data (Egress) 5GB $0.12 per GB
Inbound Data (Ingress) Unlimited Free per GB
Outbound Data to Google APIs in same region Unlimited Free per GB

* Includes both Background and HTTP Functions.

If you pay in a currency other than USD, the prices listed in your currency on Cloud Platform SKUs apply.
Beta: This is a Beta release of Cloud Functions. This feature is not covered by any SLA or deprecation policy and may be subject to backward-incompatible changes.

Monitor your resources on the go

Get the Google Cloud Console app to help you manage your projects.