- Ensure that gcloud is installed on your terminal
- Ensure that you have a service account setup on the GCP project that you will be using, or have permissions to impersonate a service account (you need the role Service Account Token Creator)
- for impersonating a service account, run the following commands to authenticate before continuing:
-
gcloud config set project <gcp project name>
-
gcloud auth application-default login --impersonate-service-account <service account email>
- Have the GCS_BUCKET and a filename in the bucket under GCS_FILENAME in your
.env
or.envrc
- Run the example with
node .
- A signed link to the filename specified in the environment variables should appear as an output from the example. Opening the link in your browser should display or give access to the file.