GCS client does not accept a service account ID. It just auto-discovers one when running on Google-managed infrastructure. Quoting from my post:

The GCS library for Node.js does support IAM-based signing now, when deployed in Google-managed runtimes. It basically implements steps 1 and 4 of the new signing protocol used by the Firebase Admin SDK.

For Cloud Functions, simply initializing the SDK without any credentials or options should do the trick.

Written by

Software engineer at Google. Enjoys working at the intersection of cloud, mobile and programming languages. Fan of all things tech and open source.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store