The Serverless Framework needs access to account credentials for your Google Cloud account so that it can create and manage resources on your behalf.
You need a Billing Account with a credit card attached to use Google Cloud Functions. Here's how to create one:
If necessary, a more detailed guide on creating a Billing Account can be found here.
A Google Cloud Project is required to use Google Cloud Functions. Here's how to create one:
You need to enable the following APIs so that Serverless can create the corresponding resources.
Go to the API dashboard, select your project and enable the following APIs (if not already enabled):
You need to create credentials Serverless can use to create resources in your Project.
keyfile
which should be downloaded on your machine.keyfile
somewhere secure. We recommend making a folder in your root folder and putting it there. Like this, ~/.gcloud/keyfile.json
. You can change the file name from keyfile
to anything. Remember the path you saved it to.provider
config in serverless.yml
Open up your serverless.yml
file and update the provider
section with your Google Cloud Project id and
the path to your keyfile.json
file (this path needs to be absolute!). It should look something like this:
provider:
name: google
runtime: nodejs
project: my-serverless-project-1234
credentials: ~/.gcloud/keyfile.json
developers
Made with love in San Francisco + Atlanta, Austria, Germany, Pakistan, Poland, Nebraska & Thailand
Serverless, Inc. © 2018