Search code examples
gitfirebasedeploymentenvironment-variablesnetlify

JSON in Environmental Variable on Netlify


I am building an AWS Lambda function that uses ServiceAccountKey.json for Firebase authentication. When deploying to Netlify, I don't want to expose this data in the git repo. Is there a way I can save the whole JSON as an environmental variable?

JSON in environmental variable

Environmental variables on Netlify


Solution

  • If I'm not wrong, you can store the json in the env var as a simple string. Otherwise have a look a jq which allows you to run to read a json from a file and directly store it in an env var.

    Regards,