Hi Guys, In my serverless.yml file I’m trying to add an environment variable called GOOGLE_APPLICATION_CREDENTIALS which points to a JSON file but getting error Environment variable GOOGLE_APPLICATION_CREDENTIALS must contain string
I’ve tried all the below combinations but none of the method seem to work
environment:
GOOGLE_APPLICATION_CREDENTIALS: ‘${file(./serviceAccountCreds.json)}’
environment:
GOOGLE_APPLICATION_CREDENTIALS: “${file(./serviceAccountCreds.json)}”
environment:
GOOGLE_APPLICATION_CREDENTIALS: ${file(./serviceAccountCreds.json)}
My use case is I need to load google application credentials to call the GCP APIs from the AWS lambda. I’ve read answers regarding support for google cloud functions for setting the env variable pointing to the service account JSON file but doesn’t seem to help in this case.